Rename webui.py to one_click.py

This commit is contained in:
oobabooga 2023-09-22 12:00:06 -07:00
parent fe2acdf45f
commit 6c5f81f002
9 changed files with 14 additions and 14 deletions

View file

@ -51,7 +51,7 @@ Some observations:
* There is no need to run any of those scripts as admin/root.
* If you need to move your installation folder, you will need to delete `installer_files` and install again, as some links will be broken. So choose a good location for your `text-generation-webui` folder before installing.
* Additional instructions for WSL and AMD users can be found here: [Instructions](https://github.com/oobabooga/text-generation-webui/blob/one-click/docs/new/Installation%20Instructions.md).
* The installer has been tested mostly on NVIDIA GPUs. If you can find a way to improve it for your AMD/Intel Arc/Mac Metal GPU, you are highly encouraged to submit a PR to this repository.
* The installer has been tested mostly on NVIDIA GPUs. If you can find a way to improve it for your AMD/Intel Arc/Mac Metal GPU, you are highly encouraged to submit a PR to this repository. The main file to be edited is `one_click.py`.
### Manual installation using Conda

View file

@ -64,4 +64,4 @@ source "$CONDA_ROOT_PREFIX/etc/profile.d/conda.sh" # otherwise conda complains a
conda activate "$INSTALL_ENV_DIR"
# setup installer env
python webui.py $@
python one_click.py $@

View file

@ -64,4 +64,4 @@ source "$CONDA_ROOT_PREFIX/etc/profile.d/conda.sh" # otherwise conda complains a
conda activate "$INSTALL_ENV_DIR"
# setup installer env
python webui.py $@
python one_click.py $@

View file

@ -67,7 +67,7 @@ set "CUDA_HOME=%CUDA_PATH%"
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 %*
call python one_click.py %*
@rem below are functions for the script next line skips these during normal execution
goto end

View file

@ -23,7 +23,7 @@ source "$CONDA_ROOT_PREFIX/etc/profile.d/conda.sh" # otherwise conda complains a
conda activate "$INSTALL_ENV_DIR"
# update installer env
python webui.py --update
python one_click.py --update
echo
echo "Done!"

View file

@ -23,7 +23,7 @@ source "$CONDA_ROOT_PREFIX/etc/profile.d/conda.sh" # otherwise conda complains a
conda activate "$INSTALL_ENV_DIR"
# update installer env
python webui.py --update
python one_click.py --update
echo
echo "Done!"

View file

@ -28,7 +28,7 @@ set "CUDA_HOME=%CUDA_PATH%"
call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniconda hook not found. && goto end )
@rem update installer env
call python webui.py --update
call python one_click.py --update
echo.
echo Done!

14
wsl.sh
View file

@ -47,9 +47,9 @@ fi
if [[ "$INSTALL_DIR" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi
# create install dir if missing and copy webui.py to install dir to maintain functionality without edit
# create install dir if missing and copy one_click.py to install dir to maintain functionality without edit
if [ ! -d "$INSTALL_DIR" ]; then mkdir -p "$INSTALL_DIR" || exit; fi
cp -u "./webui.py" "$INSTALL_DIR"
cp -u "./one_click.py" "$INSTALL_DIR"
if [ -f "./CMD_FLAGS.txt" ]; then cp -u "./CMD_FLAGS.txt" "$INSTALL_DIR"; fi
# figure out whether git and conda needs to be installed
@ -85,9 +85,9 @@ fi
source "$CONDA_ROOT_PREFIX/etc/profile.d/conda.sh" # otherwise conda complains about 'shell not initialized' (needed when running in a script)
conda activate "$INSTALL_ENV_DIR"
# copy webui.py and CMD_FLAGS.txt to install dir to allow edits within Windows
# copy one_click.py and CMD_FLAGS.txt to install dir to allow edits within Windows
if [[ $INSTALL_INPLACE != 1 ]]; then
cp -u "./webui.py" "$INSTALL_DIR"
cp -u "./one_click.py" "$INSTALL_DIR"
if [ -f "./CMD_FLAGS.txt" ]; then cp -u "./CMD_FLAGS.txt" "$INSTALL_DIR"; fi
fi
@ -100,11 +100,11 @@ if [ ! -f "./server.py" ]; then
git remote set-head origin -a
git reset origin/HEAD --hard
git branch --set-upstream-to=origin/HEAD
git restore -- . :!./webui.py :!./CMD_FLAGS.txt
git restore -- . :!./one_click.py :!./CMD_FLAGS.txt
fi
# setup installer env update env if called with 'wsl.sh update'
case "$1" in
("update") python webui.py --update;;
(*) python webui.py $@;;
("update") python one_click.py --update;;
(*) python one_click.py $@;;
esac