diff --git a/download-model.bat b/download-model.bat index e1b7442f..af2610c6 100644 --- a/download-model.bat +++ b/download-model.bat @@ -7,11 +7,10 @@ cd /D "%~dp0" set MAMBA_ROOT_PREFIX=%cd%\installer_files\mamba set INSTALL_ENV_DIR=%cd%\installer_files\env -if not exist "%MAMBA_ROOT_PREFIX%\Scripts\activate.bat" ( +if not exist "%MAMBA_ROOT_PREFIX%\condabin\micromamba.bat" ( call "%MAMBA_ROOT_PREFIX%\micromamba.exe" shell hook >nul 2>&1 ) -call "%MAMBA_ROOT_PREFIX%\condabin\mamba_hook.bat" || ( echo MicroMamba hook not found. && goto end ) -call micromamba activate "%INSTALL_ENV_DIR%" || goto end +call "%MAMBA_ROOT_PREFIX%\condabin\micromamba.bat" activate "%INSTALL_ENV_DIR%" || ( echo MicroMamba hook not found. && goto end ) cd text-generation-webui || goto end goto %TextOnly% diff --git a/install.bat b/install.bat index ac86f775..43c68949 100644 --- a/install.bat +++ b/install.bat @@ -53,25 +53,20 @@ if "%PACKAGES_TO_INSTALL%" NEQ "" ( ) @rem create micromamba hook - if not exist "%MAMBA_ROOT_PREFIX%\condabin\mamba_hook.bat" ( + if not exist "%MAMBA_ROOT_PREFIX%\condabin\micromamba.bat" ( call "%MAMBA_ROOT_PREFIX%\micromamba.exe" shell hook >nul 2>&1 ) - @rem activate base micromamba env - call "%MAMBA_ROOT_PREFIX%\condabin\mamba_hook.bat" || ( echo Micromamba hook not found. && goto end ) - @rem create the installer env if not exist "%INSTALL_ENV_DIR%" ( - call micromamba create -y --prefix "%INSTALL_ENV_DIR%" + echo Packages to install: %PACKAGES_TO_INSTALL% + call "%MAMBA_ROOT_PREFIX%\micromamba.exe" create -y --prefix "%INSTALL_ENV_DIR%" %CHANNEL% %PACKAGES_TO_INSTALL% ) - @rem activate installer env - call micromamba activate "%INSTALL_ENV_DIR%" || ( echo %INSTALL_ENV_DIR% not found. && goto end ) - - echo "Packages to install: %PACKAGES_TO_INSTALL%" - - call micromamba install -y %CHANNEL% %PACKAGES_TO_INSTALL% ) +@rem activate installer env +call "%MAMBA_ROOT_PREFIX%\condabin\micromamba.bat" activate "%INSTALL_ENV_DIR%" || ( echo MicroMamba hook not found. && goto end ) + @rem clone the repository and install the pip requirements if exist text-generation-webui\ ( cd text-generation-webui @@ -122,4 +117,4 @@ sed -i "s/if not torch.cuda.is_available(): return 'libsbitsandbytes_cpu.so', No sed -i "s/ct.cdll.LoadLibrary(binary_path)/ct.cdll.LoadLibrary(str(binary_path))/g" "%INSTALL_ENV_DIR%\lib\site-packages\bitsandbytes\cuda_setup\main.py" :end -pause +pause \ No newline at end of file diff --git a/micromamba-cmd.bat b/micromamba-cmd.bat index 0365fcec..355e7b43 100644 --- a/micromamba-cmd.bat +++ b/micromamba-cmd.bat @@ -5,11 +5,10 @@ cd /D "%~dp0" set MAMBA_ROOT_PREFIX=%cd%\installer_files\mamba set INSTALL_ENV_DIR=%cd%\installer_files\env -if not exist "%MAMBA_ROOT_PREFIX%\Scripts\activate.bat" ( +if not exist "%MAMBA_ROOT_PREFIX%\condabin\micromamba.bat" ( call "%MAMBA_ROOT_PREFIX%\micromamba.exe" shell hook >nul 2>&1 ) -call "%MAMBA_ROOT_PREFIX%\condabin\mamba_hook.bat" || ( echo Micromamba hook not found. && goto end ) -call micromamba activate "%INSTALL_ENV_DIR%" || goto end +call "%MAMBA_ROOT_PREFIX%\condabin\micromamba.bat" activate "%INSTALL_ENV_DIR%" || ( echo MicroMamba hook not found. && goto end ) cmd /k "%*" diff --git a/start-webui.bat b/start-webui.bat index 32d7833d..694f07a1 100644 --- a/start-webui.bat +++ b/start-webui.bat @@ -7,11 +7,10 @@ cd /D "%~dp0" set MAMBA_ROOT_PREFIX=%cd%\installer_files\mamba set INSTALL_ENV_DIR=%cd%\installer_files\env -if not exist "%MAMBA_ROOT_PREFIX%\Scripts\activate.bat" ( +if not exist "%MAMBA_ROOT_PREFIX%\condabin\micromamba.bat" ( call "%MAMBA_ROOT_PREFIX%\micromamba.exe" shell hook >nul 2>&1 ) -call "%MAMBA_ROOT_PREFIX%\condabin\mamba_hook.bat" || ( echo Micromamba hook not found. && goto end ) -call micromamba activate "%INSTALL_ENV_DIR%" || goto end +call "%MAMBA_ROOT_PREFIX%\condabin\micromamba.bat" activate "%INSTALL_ENV_DIR%" || ( echo MicroMamba hook not found. && goto end ) cd text-generation-webui call python server.py --auto-devices --cai-chat