mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-21 02:24:29 -04:00
Only create a venv when we're installing python ourselves
This commit is contained in:
+4
-1
@@ -4,6 +4,8 @@
|
||||
if [[ -f "/mod-pip-packages-to-install.list" ]]; then
|
||||
IFS=' ' read -ra PIP_PACKAGES <<< "$(tr '\n' ' ' < /mod-pip-packages-to-install.list)"
|
||||
if [[ ${#PIP_PACKAGES[@]} -ne 0 ]] && [[ ${PIP_PACKAGES[*]} != "" ]]; then
|
||||
if ! command -v python3; then
|
||||
CREATE_VENV="true"
|
||||
if [[ -f /usr/bin/apt ]]; then
|
||||
echo "python3-venv" >> /mod-repo-packages-to-install.list
|
||||
elif [[ -f /sbin/apk ]]; then
|
||||
@@ -15,6 +17,7 @@ if [[ -f "/mod-pip-packages-to-install.list" ]]; then
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -f "/mod-repo-packages-to-install.list" ]]; then
|
||||
IFS=' ' read -ra REPO_PACKAGES <<< "$(tr '\n' ' ' < /mod-repo-packages-to-install.list)"
|
||||
@@ -42,7 +45,7 @@ if [[ -f "/mod-pip-packages-to-install.list" ]]; then
|
||||
IFS=' ' read -ra PIP_PACKAGES <<< "$(tr '\n' ' ' < /mod-pip-packages-to-install.list)"
|
||||
if [[ ${#PIP_PACKAGES[@]} -ne 0 ]] && [[ ${PIP_PACKAGES[*]} != "" ]]; then
|
||||
echo "[mod-init] **** Installing all pip packages ****"
|
||||
if ! command -v pip; then
|
||||
if [[ ${CREATE_VENV} == "true" ]]; then
|
||||
echo "**** Creating venv ****"
|
||||
python3 -m venv /lsiopy
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user