K: -> B: Drive

Pre-emptive change for people who may have existing K: drives. B: is never used unless its by programs like ours which is very rare. The installer now always installs as B:, but to maintain compatibility with older runtimes the scripts check if its K: or B:.
This commit is contained in:
henk717 2022-01-13 23:52:21 +01:00
parent e277068bf2
commit 3b42f31137
5 changed files with 50 additions and 14 deletions

View File

@ -4,6 +4,7 @@ TITLE CMD for KoboldAI Runtime
SET /P M=<loader.settings
IF %M%==1 GOTO drivemap
IF %M%==2 GOTO subfolder
IF %M%==3 GOTO drivemap_B
:subfolder
SET TEMP=%~DP0MINICONDA3
@ -16,4 +17,11 @@ subst K: miniconda3 >nul
SET TEMP=K:\
SET TMP=K:\
call K:\python\condabin\activate
cmd /k
:drivemap_B
subst B: miniconda3 >nul
SET TEMP=B:\
SET TMP=B:\
call B:\python\condabin\activate
cmd /k

View File

@ -27,7 +27,7 @@ IF %D%==1 rmdir /s /q miniconda3
:Mode
echo Which installation mode would you like?
echo 1. Temporary Drive Letter (Mounts the folder as drive K:, more stable and portable)
echo 1. Temporary Drive Letter (Mounts the folder as drive B:, more stable and portable)
echo 2. Subfolder (Traditional method, can't run in folder paths that contain spaces)
echo.
SET /P M=Type the number of the desired option and then press ENTER:
@ -38,20 +38,20 @@ GOTO MODE
:drivemap
echo 1 > loader.settings
subst K: /D >nul
echo 3 > loader.settings
subst B: /D >nul
mkdir miniconda3
subst K: miniconda3
SET TEMP=K:\
SET TMP=K:\
copy umamba.exe K:\umamba.exe
K:
umamba.exe create -r K:\python\ -n base
IF %B%==1 umamba.exe install --no-shortcuts -r K:\python\ -n base -f "%~dp0\environments\huggingface.yml" -y --always-copy
IF %B%==2 umamba.exe install --no-shortcuts -r K:\python\ -n base -f "%~dp0\environments\finetuneanon.yml" -y --always-copy
umamba.exe -r K:\ clean -a -y
rd K:\Python\pkgs /S /Q
subst K: /d
subst B: miniconda3
SET TEMP=B:\
SET TMP=B:\
copy umamba.exe B:\umamba.exe
B:
umamba.exe create -r B:\python\ -n base
IF %B%==1 umamba.exe install --no-shortcuts -r B:\python\ -n base -f "%~dp0\environments\huggingface.yml" -y --always-copy
IF %B%==2 umamba.exe install --no-shortcuts -r B:\python\ -n base -f "%~dp0\environments\finetuneanon.yml" -y --always-copy
umamba.exe -r B:\ clean -a -y
rd B:\Python\pkgs /S /Q
subst B: /d
pause
exit

View File

@ -4,6 +4,7 @@ TITLE Jupyter for KoboldAI Runtime
SET /P M=<loader.settings
IF %M%==1 GOTO drivemap
IF %M%==2 GOTO subfolder
IF %M%==3 GOTO drivemap_B
:subfolder
umamba.exe install --no-shortcuts -r miniconda3 -n base -c conda-forge jupyter
@ -17,4 +18,12 @@ umamba.exe install --no-shortcuts -r K:\python\ -n base -c conda-forge jupyter
call K:\python\condabin\activate
jupyter notebook
subst K: /D
cmd /k
:drivemap_B
subst B: miniconda3 >nul
umamba.exe install --no-shortcuts -r B:\python\ -n base -c conda-forge jupyter
call B:\python\condabin\activate
jupyter notebook
subst B: /D
cmd /k

View File

@ -4,6 +4,7 @@ TITLE KoboldAI - Server
SET /P M=<loader.settings
IF %M%==1 GOTO drivemap
IF %M%==2 GOTO subfolder
IF %M%==3 GOTO drivemap_B
:subfolder
ECHO Runtime launching in subfolder mode
@ -22,3 +23,13 @@ call K:\python\condabin\activate
python aiserver.py %*
subst K: /D
cmd /k
:drivemap_B
ECHO Runtime launching in B: drive mode
subst B: miniconda3 >nul
SET TEMP=B:\
SET TMP=B:\
call B:\python\condabin\activate
python aiserver.py %*
subst B: /D
cmd /k

View File

@ -5,6 +5,7 @@ TITLE KoboldAI - Updater
SET /P M=<loader.settings
IF %M%==1 GOTO drivemap
IF %M%==2 GOTO subfolder
IF %M%==3 GOTO drivemap_B
:subfolder
SET TEMP=%~DP0MINICONDA3
@ -19,6 +20,13 @@ SET TMP=K:\
call K:\python\condabin\activate
GOTO GIT
:drivemap_B
subst B: miniconda3 >nul
SET TEMP=B:\
SET TMP=B:\
call B:\python\condabin\activate
GOTO GIT
:GIT
ECHO 1. KoboldAI Main (The Official stable version of KoboldAI)
ECHO 2. KoboldAI United (Development Version, new features but may break at any time)