mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-23 08:28:21 +01:00
Add Conda env deactivation to installer scripts
Avoids conflicts with existing Conda installations
This commit is contained in:
parent
6bbfc40d10
commit
cd1049eded
@ -4,6 +4,9 @@ cd "$(dirname "${BASH_SOURCE[0]}")"
|
|||||||
|
|
||||||
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi
|
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi
|
||||||
|
|
||||||
|
# deactivate existing conda envs as needed to avoid conflicts
|
||||||
|
{ conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null
|
||||||
|
|
||||||
# config
|
# config
|
||||||
CONDA_ROOT_PREFIX="$(pwd)/installer_files/conda"
|
CONDA_ROOT_PREFIX="$(pwd)/installer_files/conda"
|
||||||
INSTALL_ENV_DIR="$(pwd)/installer_files/env"
|
INSTALL_ENV_DIR="$(pwd)/installer_files/env"
|
||||||
|
@ -4,8 +4,8 @@ cd "$(dirname "${BASH_SOURCE[0]}")"
|
|||||||
|
|
||||||
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi
|
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi
|
||||||
|
|
||||||
# deactivate existing env if needed
|
# deactivate existing conda envs as needed to avoid conflicts
|
||||||
conda deactivate 2> /dev/null
|
{ conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null
|
||||||
|
|
||||||
# config
|
# config
|
||||||
CONDA_ROOT_PREFIX="$(pwd)/installer_files/conda"
|
CONDA_ROOT_PREFIX="$(pwd)/installer_files/conda"
|
||||||
|
@ -10,6 +10,9 @@ echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniconda which c
|
|||||||
set TMP=%cd%\installer_files
|
set TMP=%cd%\installer_files
|
||||||
set TEMP=%cd%\installer_files
|
set TEMP=%cd%\installer_files
|
||||||
|
|
||||||
|
@rem deactivate existing conda envs as needed to avoid conflicts
|
||||||
|
(conda deactivate && conda deactivate && conda deactivate) 2>null
|
||||||
|
|
||||||
@rem config
|
@rem config
|
||||||
set CONDA_ROOT_PREFIX=%cd%\installer_files\conda
|
set CONDA_ROOT_PREFIX=%cd%\installer_files\conda
|
||||||
set INSTALL_ENV_DIR=%cd%\installer_files\env
|
set INSTALL_ENV_DIR=%cd%\installer_files\env
|
||||||
|
@ -4,6 +4,9 @@ cd "$(dirname "${BASH_SOURCE[0]}")"
|
|||||||
|
|
||||||
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi
|
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi
|
||||||
|
|
||||||
|
# deactivate existing conda envs as needed to avoid conflicts
|
||||||
|
{ conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null
|
||||||
|
|
||||||
OS_ARCH=$(uname -m)
|
OS_ARCH=$(uname -m)
|
||||||
case "${OS_ARCH}" in
|
case "${OS_ARCH}" in
|
||||||
x86_64*) OS_ARCH="x86_64";;
|
x86_64*) OS_ARCH="x86_64";;
|
||||||
|
@ -4,6 +4,9 @@ cd "$(dirname "${BASH_SOURCE[0]}")"
|
|||||||
|
|
||||||
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi
|
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi
|
||||||
|
|
||||||
|
# deactivate existing conda envs as needed to avoid conflicts
|
||||||
|
{ conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null
|
||||||
|
|
||||||
# M Series or Intel
|
# M Series or Intel
|
||||||
OS_ARCH=$(uname -m)
|
OS_ARCH=$(uname -m)
|
||||||
case "${OS_ARCH}" in
|
case "${OS_ARCH}" in
|
||||||
|
@ -17,6 +17,9 @@ set SPCHARMESSAGE=
|
|||||||
set TMP=%cd%\installer_files
|
set TMP=%cd%\installer_files
|
||||||
set TEMP=%cd%\installer_files
|
set TEMP=%cd%\installer_files
|
||||||
|
|
||||||
|
@rem deactivate existing conda envs as needed to avoid conflicts
|
||||||
|
(conda deactivate && conda deactivate && conda deactivate) 2>null
|
||||||
|
|
||||||
@rem config
|
@rem config
|
||||||
set INSTALL_DIR=%cd%\installer_files
|
set INSTALL_DIR=%cd%\installer_files
|
||||||
set CONDA_ROOT_PREFIX=%cd%\installer_files\conda
|
set CONDA_ROOT_PREFIX=%cd%\installer_files\conda
|
||||||
|
@ -4,6 +4,9 @@ cd "$(dirname "${BASH_SOURCE[0]}")"
|
|||||||
|
|
||||||
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi
|
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi
|
||||||
|
|
||||||
|
# deactivate existing conda envs as needed to avoid conflicts
|
||||||
|
{ conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null
|
||||||
|
|
||||||
# config
|
# config
|
||||||
CONDA_ROOT_PREFIX="$(pwd)/installer_files/conda"
|
CONDA_ROOT_PREFIX="$(pwd)/installer_files/conda"
|
||||||
INSTALL_ENV_DIR="$(pwd)/installer_files/env"
|
INSTALL_ENV_DIR="$(pwd)/installer_files/env"
|
||||||
|
@ -4,6 +4,9 @@ cd "$(dirname "${BASH_SOURCE[0]}")"
|
|||||||
|
|
||||||
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi
|
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi
|
||||||
|
|
||||||
|
# deactivate existing conda envs as needed to avoid conflicts
|
||||||
|
{ conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null
|
||||||
|
|
||||||
# config
|
# config
|
||||||
CONDA_ROOT_PREFIX="$(pwd)/installer_files/conda"
|
CONDA_ROOT_PREFIX="$(pwd)/installer_files/conda"
|
||||||
INSTALL_ENV_DIR="$(pwd)/installer_files/env"
|
INSTALL_ENV_DIR="$(pwd)/installer_files/env"
|
||||||
|
@ -10,6 +10,9 @@ echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniconda which c
|
|||||||
set TMP=%cd%\installer_files
|
set TMP=%cd%\installer_files
|
||||||
set TEMP=%cd%\installer_files
|
set TEMP=%cd%\installer_files
|
||||||
|
|
||||||
|
@rem deactivate existing conda envs as needed to avoid conflicts
|
||||||
|
(conda deactivate && conda deactivate && conda deactivate) 2>null
|
||||||
|
|
||||||
@rem config
|
@rem config
|
||||||
set CONDA_ROOT_PREFIX=%cd%\installer_files\conda
|
set CONDA_ROOT_PREFIX=%cd%\installer_files\conda
|
||||||
set INSTALL_ENV_DIR=%cd%\installer_files\env
|
set INSTALL_ENV_DIR=%cd%\installer_files\env
|
||||||
|
4
wsl.sh
4
wsl.sh
@ -15,8 +15,8 @@ read -n1 -p "Continue the installer anyway? [y,n]" EXIT_PROMPT
|
|||||||
if ! [[ $EXIT_PROMPT == "Y" || $EXIT_PROMPT == "y" ]]; then exit; fi
|
if ! [[ $EXIT_PROMPT == "Y" || $EXIT_PROMPT == "y" ]]; then exit; fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# deactivate any currently active conda env
|
# deactivate existing conda envs as needed to avoid conflicts
|
||||||
conda deactivate 2> /dev/null
|
{ conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null
|
||||||
|
|
||||||
# config unlike other scripts, can't use current directory due to file IO bug in WSL, needs to be in virtual drive
|
# config unlike other scripts, can't use current directory due to file IO bug in WSL, needs to be in virtual drive
|
||||||
INSTALL_DIR="$HOME/text-gen-install"
|
INSTALL_DIR="$HOME/text-gen-install"
|
||||||
|
Loading…
Reference in New Issue
Block a user