Guest User

Untitled

a guest
Mar 23rd, 2024
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.98 KB | None | 0 0
  1. @echo off
  2. setlocal enabledelayedexpansion
  3.  
  4. cd /D "%~dp0"
  5.  
  6. set PATH=%PATH%;%SystemRoot%\system32
  7.  
  8. echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniconda which can not be silently installed under a path with spaces. && goto end
  9.  
  10. @rem fix failed install when installing to a separate drive
  11. set TMP=%cd%\installer_files
  12. set TEMP=%cd%\installer_files
  13.  
  14. @rem deactivate existing conda envs as needed to avoid conflicts
  15. (call conda deactivate && call conda deactivate && call conda deactivate) 2>nul
  16.  
  17. @rem config
  18. set CONDA_ROOT_PREFIX=%cd%\installer_files\conda
  19. set INSTALL_ENV_DIR=%cd%\installer_files\env
  20.  
  21. @rem environment isolation
  22. set PYTHONNOUSERSITE=1
  23. set PYTHONPATH=
  24. set PYTHONHOME=
  25. set "CUDA_PATH=%INSTALL_ENV_DIR%"
  26. set "CUDA_HOME=%CUDA_PATH%"
  27.  
  28. @rem activate installer env
  29. call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniconda hook not found. && goto end )
  30.  
  31. @rem enter commands
  32. cmd /k "%*"
  33.  
  34. :end
  35. pause
Advertisement
Add Comment
Please, Sign In to add comment