mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-06-23 00:32:58 -04:00
Don't create venv if pip is already installed
This commit is contained in:
+2
-6
@@ -42,7 +42,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 [[ ! -d /lsiopy/bin ]]; then
|
||||
if ! command -v pip; then
|
||||
echo "**** Creating venv ****"
|
||||
python3 -m venv /lsiopy
|
||||
fi
|
||||
@@ -52,11 +52,7 @@ if [[ -f "/mod-pip-packages-to-install.list" ]]; then
|
||||
PIP_ARGS+=("-f" "https://wheel-index.linuxserver.io/ubuntu/")
|
||||
elif [[ -f /sbin/apk ]]; then
|
||||
ALPINE_VER=$(grep main /etc/apk/repositories | sed 's|.*alpine/v||' | sed 's|/main.*||')
|
||||
if [[ "${ALPINE_VER}" = "3.14" ]]; then
|
||||
PIP_ARGS+=("-f" "https://wheel-index.linuxserver.io/alpine/")
|
||||
else
|
||||
PIP_ARGS+=("-f" "https://wheel-index.linuxserver.io/alpine-${ALPINE_VER}/")
|
||||
fi
|
||||
PIP_ARGS+=("-f" "https://wheel-index.linuxserver.io/alpine-${ALPINE_VER}/")
|
||||
fi
|
||||
python3 -m pip install \
|
||||
"${PIP_ARGS[@]}" \
|
||||
|
||||
Reference in New Issue
Block a user