brought manual instructions up to date

reworked launching with different parameters
This commit is contained in:
AUTOMATIC
2022-09-09 08:37:19 +03:00
parent 0c63aa95e1
commit 1fd2c22919
3 changed files with 97 additions and 54 deletions

View File

@@ -1,19 +1,14 @@
@echo off
set PYTHON=python
set GIT=git
set COMMANDLINE_ARGS=%*
set VENV_DIR=venv
if exist webui.settings.bat (
call webui.settings.bat
)
if not defined PYTHON (set PYTHON=python)
if not defined GIT (set GIT=git)
if not defined COMMANDLINE_ARGS (set COMMANDLINE_ARGS=%*)
if not defined VENV_DIR (set VENV_DIR=venv)
if not defined TORCH_COMMAND (set TORCH_COMMAND=pip install torch==1.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113)
if not defined REQS_FILE (set REQS_FILE=requirements_versions.txt)
mkdir tmp 2>NUL
set TORCH_COMMAND=pip install torch==1.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
set REQS_FILE=requirements_versions.txt
%PYTHON% -c "" >tmp/stdout.txt 2>tmp/stderr.txt
if %ERRORLEVEL% == 0 goto :check_git
echo Couldn't launch python
@@ -26,7 +21,7 @@ echo Couldn't launch git
goto :show_stdout_stderr
:setup_venv
if [%VENV_DIR%] == [] goto :skip_venv
if [%VENV_DIR%] == [-] goto :skip_venv
dir %VENV_DIR%\Scripts\Python.exe >tmp/stdout.txt 2>tmp/stderr.txt
if %ERRORLEVEL% == 0 goto :activate_venv