mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-23 00:18:20 +01:00
6d2c72b593
* Initial commit * Initial commit with new code * Add comments * Move GPTQ out of if * Fix install on Arch Linux * Fix case where install was aborted If the install was aborted before a model was downloaded, webui wouldn't run. * Update start_windows.bat Add necessary flags to Miniconda installer Disable Start Menu shortcut creation Disable ssl on Conda Change Python version to latest 3.10, I've noticed that explicitly specifying 3.10.9 can break the included Python installation * Update bitsandbytes wheel link to 0.38.1 Disable ssl on Conda * Add check for spaces in path Installation of Miniconda will fail in this case * Mirror changes to mac and linux scripts * Start with model-menu * Add updaters * Fix line endings * Add check for path with spaces * Fix one-click updating * Fix one-click updating * Clean up update scripts * Add environment scripts --------- Co-authored-by: jllllll <3887729+jllllll@users.noreply.github.com> Co-authored-by: oobabooga <112222186+oobabooga@users.noreply.github.com>
56 lines
2.1 KiB
Batchfile
56 lines
2.1 KiB
Batchfile
@echo off
|
|
|
|
cd /D "%~dp0"
|
|
|
|
echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniconda which can not be silently installed under a path with spaces. && goto end
|
|
|
|
set PATH=%PATH%;%SystemRoot%\system32
|
|
|
|
@rem config
|
|
set INSTALL_DIR=%cd%\installer_files
|
|
set CONDA_ROOT_PREFIX=%cd%\installer_files\conda
|
|
set INSTALL_ENV_DIR=%cd%\installer_files\env
|
|
set MINICONDA_DOWNLOAD_URL=https://repo.anaconda.com/miniconda/Miniconda3-py310_23.1.0-1-Windows-x86_64.exe
|
|
set conda_exists=F
|
|
|
|
@rem figure out whether git and conda needs to be installed
|
|
call "%CONDA_ROOT_PREFIX%\_conda.exe" --version >nul 2>&1
|
|
if "%ERRORLEVEL%" EQU "0" set conda_exists=T
|
|
|
|
@rem (if necessary) install git and conda into a contained environment
|
|
@rem download conda
|
|
if "%conda_exists%" == "F" (
|
|
echo Downloading Miniconda from %MINICONDA_DOWNLOAD_URL% to %INSTALL_DIR%\miniconda_installer.exe
|
|
|
|
mkdir "%INSTALL_DIR%"
|
|
call curl -Lk "%MINICONDA_DOWNLOAD_URL%" > "%INSTALL_DIR%\miniconda_installer.exe" || ( echo. && echo Miniconda failed to download. && goto end )
|
|
|
|
echo Installing Miniconda to %CONDA_ROOT_PREFIX%
|
|
start /wait "" "%INSTALL_DIR%\miniconda_installer.exe" /InstallationType=JustMe /NoShortcuts=1 /AddToPath=0 /RegisterPython=0 /NoRegistry=1 /S /D=%CONDA_ROOT_PREFIX%
|
|
|
|
@rem test the conda binary
|
|
echo Miniconda version:
|
|
call "%CONDA_ROOT_PREFIX%\_conda.exe" --version || ( echo. && echo Miniconda not found. && goto end )
|
|
)
|
|
|
|
@rem create the installer env
|
|
if not exist "%INSTALL_ENV_DIR%" (
|
|
echo Packages to install: %PACKAGES_TO_INSTALL%
|
|
call "%CONDA_ROOT_PREFIX%\_conda.exe" create --no-shortcuts -y -k --prefix "%INSTALL_ENV_DIR%" python=3.10 || ( echo. && echo Conda environment creation failed. && goto end )
|
|
)
|
|
|
|
@rem check if conda environment was actually created
|
|
if not exist "%INSTALL_ENV_DIR%\python.exe" ( echo. && echo Conda environment is empty. && goto end )
|
|
|
|
@rem activate installer env
|
|
call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniconda hook not found. && goto end )
|
|
|
|
@rem setup installer env
|
|
call python webui.py
|
|
|
|
echo.
|
|
echo Done!
|
|
|
|
:end
|
|
pause
|