mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-12-23 21:18:00 +01:00
Improve environment isolation (#68)
This commit is contained in:
parent
c8ce2e777b
commit
b1b3bb6923
@ -8,5 +8,12 @@ if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can no
|
||||
CONDA_ROOT_PREFIX="$(pwd)/installer_files/conda"
|
||||
INSTALL_ENV_DIR="$(pwd)/installer_files/env"
|
||||
|
||||
# environment isolation
|
||||
export PYTHONNOUSERSITE=1
|
||||
unset PYTHONPATH
|
||||
unset PYTHONHOME
|
||||
export CUDA_PATH="$INSTALL_ENV_DIR"
|
||||
export CUDA_HOME="$CUDA_PATH"
|
||||
|
||||
# activate env
|
||||
bash --init-file <(echo "source \"$CONDA_ROOT_PREFIX/etc/profile.d/conda.sh\" && conda activate \"$INSTALL_ENV_DIR\"")
|
||||
|
@ -8,5 +8,12 @@ if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can no
|
||||
CONDA_ROOT_PREFIX="$(pwd)/installer_files/conda"
|
||||
INSTALL_ENV_DIR="$(pwd)/installer_files/env"
|
||||
|
||||
# environment isolation
|
||||
export PYTHONNOUSERSITE=1
|
||||
unset PYTHONPATH
|
||||
unset PYTHONHOME
|
||||
export CUDA_PATH="$INSTALL_ENV_DIR"
|
||||
export CUDA_HOME="$CUDA_PATH"
|
||||
|
||||
# activate env
|
||||
bash --init-file <(echo "source \"$CONDA_ROOT_PREFIX/etc/profile.d/conda.sh\" && conda activate \"$INSTALL_ENV_DIR\"")
|
||||
|
@ -14,6 +14,13 @@ set TEMP=%cd%\installer_files
|
||||
set CONDA_ROOT_PREFIX=%cd%\installer_files\conda
|
||||
set INSTALL_ENV_DIR=%cd%\installer_files\env
|
||||
|
||||
@rem environment isolation
|
||||
set PYTHONNOUSERSITE=1
|
||||
set PYTHONPATH=
|
||||
set PYTHONHOME=
|
||||
set "CUDA_PATH=%INSTALL_ENV_DIR%"
|
||||
set "CUDA_HOME=%CUDA_PATH%"
|
||||
|
||||
@rem activate installer env
|
||||
call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniconda hook not found. && goto end )
|
||||
|
||||
|
@ -49,6 +49,13 @@ if [ ! -e "$INSTALL_ENV_DIR/bin/python" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
# environment isolation
|
||||
export PYTHONNOUSERSITE=1
|
||||
unset PYTHONPATH
|
||||
unset PYTHONHOME
|
||||
export CUDA_PATH="$INSTALL_ENV_DIR"
|
||||
export CUDA_HOME="$CUDA_PATH"
|
||||
|
||||
# activate installer env
|
||||
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"
|
||||
|
@ -49,6 +49,13 @@ if [ ! -e "$INSTALL_ENV_DIR/bin/python" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
# environment isolation
|
||||
export PYTHONNOUSERSITE=1
|
||||
unset PYTHONPATH
|
||||
unset PYTHONHOME
|
||||
export CUDA_PATH="$INSTALL_ENV_DIR"
|
||||
export CUDA_HOME="$CUDA_PATH"
|
||||
|
||||
# activate installer env
|
||||
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"
|
||||
|
@ -46,6 +46,13 @@ if not exist "%INSTALL_ENV_DIR%" (
|
||||
@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 environment isolation
|
||||
set PYTHONNOUSERSITE=1
|
||||
set PYTHONPATH=
|
||||
set PYTHONHOME=
|
||||
set "CUDA_PATH=%INSTALL_ENV_DIR%"
|
||||
set "CUDA_HOME=%CUDA_PATH%"
|
||||
|
||||
@rem activate installer env
|
||||
call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniconda hook not found. && goto end )
|
||||
|
||||
|
@ -8,6 +8,13 @@ if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can no
|
||||
CONDA_ROOT_PREFIX="$(pwd)/installer_files/conda"
|
||||
INSTALL_ENV_DIR="$(pwd)/installer_files/env"
|
||||
|
||||
# environment isolation
|
||||
export PYTHONNOUSERSITE=1
|
||||
unset PYTHONPATH
|
||||
unset PYTHONHOME
|
||||
export CUDA_PATH="$INSTALL_ENV_DIR"
|
||||
export CUDA_HOME="$CUDA_PATH"
|
||||
|
||||
# activate installer env
|
||||
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"
|
||||
|
@ -8,6 +8,13 @@ if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can no
|
||||
CONDA_ROOT_PREFIX="$(pwd)/installer_files/conda"
|
||||
INSTALL_ENV_DIR="$(pwd)/installer_files/env"
|
||||
|
||||
# environment isolation
|
||||
export PYTHONNOUSERSITE=1
|
||||
unset PYTHONPATH
|
||||
unset PYTHONHOME
|
||||
export CUDA_PATH="$INSTALL_ENV_DIR"
|
||||
export CUDA_HOME="$CUDA_PATH"
|
||||
|
||||
# activate installer env
|
||||
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"
|
||||
|
@ -14,6 +14,13 @@ set TEMP=%cd%\installer_files
|
||||
set CONDA_ROOT_PREFIX=%cd%\installer_files\conda
|
||||
set INSTALL_ENV_DIR=%cd%\installer_files\env
|
||||
|
||||
@rem environment isolation
|
||||
set PYTHONNOUSERSITE=1
|
||||
set PYTHONPATH=
|
||||
set PYTHONHOME=
|
||||
set "CUDA_PATH=%INSTALL_ENV_DIR%"
|
||||
set "CUDA_HOME=%CUDA_PATH%"
|
||||
|
||||
@rem activate installer env
|
||||
call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniconda hook not found. && goto end )
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user