2021-06-06 15:01:11 +02:00
|
|
|
@echo off
|
2021-06-28 22:35:15 +02:00
|
|
|
title KoboldAI Runtime Installer (MicroMamba)
|
2022-07-26 00:45:40 +02:00
|
|
|
|
2021-06-28 22:35:15 +02:00
|
|
|
echo Errors? Rerun this as admin so it can add the needed LongPathsEnabled registery tweak.
|
|
|
|
echo Installer failed or crashed? Run it again so it can continue.
|
|
|
|
echo Only Windows 10 and higher officially supported, older Windows installations can't handle the paths.
|
2021-06-17 03:47:59 +02:00
|
|
|
echo.
|
|
|
|
|
|
|
|
Reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v "LongPathsEnabled" /t REG_DWORD /d "1" /f 2>nul
|
2021-12-22 21:56:57 +01:00
|
|
|
cd /D %~dp0
|
2021-06-28 22:35:15 +02:00
|
|
|
|
|
|
|
if exist miniconda3\ (
|
|
|
|
echo Delete existing installation?
|
|
|
|
echo This is required if you are switching modes, or if you get dependency errors in the game.
|
|
|
|
echo 1. Yes
|
|
|
|
echo 2. No
|
|
|
|
SET /P D=Type the number of the desired option and then press ENTER:
|
2021-06-06 15:01:11 +02:00
|
|
|
) ELSE (
|
2021-06-28 22:35:15 +02:00
|
|
|
SET D=Workaround
|
2021-06-06 15:01:11 +02:00
|
|
|
)
|
2021-06-28 22:35:15 +02:00
|
|
|
IF %D%==1 rmdir /s /q miniconda3
|
|
|
|
|
|
|
|
:Mode
|
|
|
|
echo Which installation mode would you like?
|
2022-01-13 23:52:21 +01:00
|
|
|
echo 1. Temporary Drive Letter (Mounts the folder as drive B:, more stable and portable)
|
2021-06-28 22:35:15 +02:00
|
|
|
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:
|
|
|
|
IF %M%==1 GOTO drivemap
|
|
|
|
IF %M%==2 GOTO subfolder
|
|
|
|
ECHO Incorrect choice
|
|
|
|
GOTO MODE
|
|
|
|
|
|
|
|
|
|
|
|
:drivemap
|
2022-01-13 23:52:21 +01:00
|
|
|
echo 3 > loader.settings
|
|
|
|
subst B: /D >nul
|
2021-06-28 22:35:15 +02:00
|
|
|
mkdir miniconda3
|
2022-01-13 23:52:21 +01:00
|
|
|
subst B: miniconda3
|
|
|
|
SET TEMP=B:\
|
|
|
|
SET TMP=B:\
|
|
|
|
copy umamba.exe B:\umamba.exe
|
2022-04-05 01:52:46 +02:00
|
|
|
copy loader.settings B:\loader.settings
|
|
|
|
copy disconnect-kobold-drive.bat B:\disconnect-kobold-drive.bat
|
2022-01-13 23:52:21 +01:00
|
|
|
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
|
2021-06-28 22:35:15 +02:00
|
|
|
pause
|
|
|
|
exit
|
|
|
|
|
|
|
|
:subfolder
|
|
|
|
echo 2 > loader.settings
|
2021-12-22 21:56:57 +01:00
|
|
|
SET TEMP=%~DP0MINICONDA3
|
|
|
|
SET TMP=%~DP0MINICONDA3
|
2021-06-28 22:35:15 +02:00
|
|
|
umamba.exe create -r miniconda3\ -n base
|
2021-12-22 23:57:21 +01:00
|
|
|
IF %B%==1 umamba.exe install --no-shortcuts -r miniconda3 -n base -f environments\huggingface.yml -y --always-copy
|
|
|
|
IF %B%==2 umamba.exe install --no-shortcuts -r miniconda3 -n base -f environments\finetuneanon.yml -y --always-copy
|
2021-06-28 22:35:15 +02:00
|
|
|
umamba.exe clean -a -y
|
2021-12-22 21:56:57 +01:00
|
|
|
rd miniconda3\Python\pkgs /S /Q
|
2021-06-06 15:01:11 +02:00
|
|
|
pause
|
2021-06-28 22:35:15 +02:00
|
|
|
exit
|