feat: use existing virtualenv if already active
This commit is contained in:
parent
22bcc7be42
commit
0d2cf9ac18
7
webui.sh
7
webui.sh
|
@ -152,6 +152,8 @@ else
|
||||||
cd "${clone_dir}"/ || { printf "\e[1m\e[31mERROR: Can't cd to %s/%s/, aborting...\e[0m" "${install_dir}" "${clone_dir}"; exit 1; }
|
cd "${clone_dir}"/ || { printf "\e[1m\e[31mERROR: Can't cd to %s/%s/, aborting...\e[0m" "${install_dir}" "${clone_dir}"; exit 1; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -z "${VIRTUAL_ENV}" ]];
|
||||||
|
then
|
||||||
printf "\n%s\n" "${delimiter}"
|
printf "\n%s\n" "${delimiter}"
|
||||||
printf "Create and activate python venv"
|
printf "Create and activate python venv"
|
||||||
printf "\n%s\n" "${delimiter}"
|
printf "\n%s\n" "${delimiter}"
|
||||||
|
@ -171,6 +173,11 @@ else
|
||||||
printf "\n%s\n" "${delimiter}"
|
printf "\n%s\n" "${delimiter}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
printf "\n%s\n" "${delimiter}"
|
||||||
|
printf "python venv already activate: ${VIRTUAL_ENV}"
|
||||||
|
printf "\n%s\n" "${delimiter}"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ! -z "${ACCELERATE}" ]] && [ ${ACCELERATE}="True" ] && [ -x "$(command -v accelerate)" ]
|
if [[ ! -z "${ACCELERATE}" ]] && [ ${ACCELERATE}="True" ] && [ -x "$(command -v accelerate)" ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in New Issue