update-runtime.cmd 1.0 KB

123456789101112131415161718192021
  1. @echo off
  2. cd /d "%~dp0"
  3. curl -O https://raw.githubusercontent.com/KoboldAI/KoboldAI-Client/386fd1f03471b3af45c6de4ba266c1ed9cb76fde/umamba.exe
  4. :Isolation
  5. call conda deactivate 2>NUL
  6. set Path=%windir%\system32;%windir%;C:\Windows\System32\Wbem;%windir%\System32\WindowsPowerShell\v1.0\;%windir%\System32\OpenSSH\
  7. SET CONDA_SHLVL=
  8. SET PYTHONNOUSERSITE=1
  9. SET PYTHONPATH=
  10. Reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v "LongPathsEnabled" /t REG_DWORD /d "1" /f 2>nul
  11. :We do this twice the first time to workaround a conda bug where pip is not installed correctly the first time - Henk
  12. IF EXIST CONDA GOTO WORKAROUND_END
  13. umamba create --no-shortcuts -r conda -n windows -f environment.yaml -y
  14. :WORKAROUND_END
  15. umamba create --no-shortcuts -r conda -n windows -f environment.yaml -y
  16. umamba run -r conda -n windows pip install -r requirements.txt
  17. umamba run -r conda -n windows pip install -e .
  18. echo If there are no errors above everything should be correctly installed (If not, try running update_runtime.cmd as admin).