diff --git a/install/calibre-web-install.sh b/install/calibre-web-install.sh index ff4d47dd7..905cd6324 100644 --- a/install/calibre-web-install.sh +++ b/install/calibre-web-install.sh @@ -15,13 +15,10 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y imagemagick +$STD apt-get install -y imagemagick calibre msg_ok "Installed Dependencies" -msg_info "Installing Python Dependencies" -$STD apt-get -y install python3-pip -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED -msg_ok "Installed Python Dependencies" +PYTHON_VERSION="3.12" setup_uv msg_info "Installing Kepubify" mkdir -p /opt/kepubify @@ -32,10 +29,10 @@ msg_ok "Installed Kepubify" msg_info "Installing Calibre-Web" mkdir -p /opt/calibre-web -$STD apt-get install -y calibre $STD curl -fsSL https://github.com/janeczku/calibre-web/raw/master/library/metadata.db -o /opt/calibre-web/metadata.db -$STD pip install calibreweb -$STD pip install jsonschema +cd /opt/calibre-web +$STD uv venv .venv +$STD .venv/bin/uv pip install calibreweb jsonschema msg_ok "Installed Calibre-Web" msg_info "Creating Service" @@ -47,7 +44,7 @@ After=network.target [Service] Type=simple WorkingDirectory=/opt/calibre-web -ExecStart=/usr/local/bin/cps +ExecStart=/opt/calibre-web/.venv/bin/cps TimeoutStopSec=20 KillMode=process Restart=on-failure diff --git a/install/crafty-controller-install.sh b/install/crafty-controller-install.sh index d12e9ae6f..7273a7af3 100644 --- a/install/crafty-controller-install.sh +++ b/install/crafty-controller-install.sh @@ -13,7 +13,7 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies (a lot of patience)" +msg_info "Installing Dependencies (Patience)" $STD apt-get install -y \ git \ sed \ @@ -32,20 +32,13 @@ $STD apt-get install -y temurin-{8,11,17,21}-jre sudo update-alternatives --set java /usr/lib/jvm/temurin-21-jre-amd64/bin/java msg_ok "Installed TemurinJDK" -msg_info "Setup Python3" -$STD apt-get install -y \ - python3 \ - python3-dev \ - python3-pip \ - python3-venv -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED -msg_ok "Setup Python3" +PYTHON_VERSION="3.12" setup_uv msg_info "Installing Craty-Controller (Patience)" useradd crafty -m -s /bin/bash cd /opt mkdir -p /opt/crafty-controller/crafty /opt/crafty-controller/server -RELEASE=$(curl -fsSL "https://gitlab.com/api/v4/projects/20430749/releases" | grep -o '"tag_name":"v[^"]*"' | head -n 1 | sed 's/"tag_name":"v//;s/"//') +RELEASE=$(curl -fsSL "https://gitlab.com/api/v4/projects/20430749/releases" | grep -o '"tag_name":"v[^\"]*"' | head -n 1 | sed 's/"tag_name":"v//;s/"//') echo "${RELEASE}" >"/opt/crafty-controller_version.txt" curl -fsSL "https://gitlab.com/crafty-controller/crafty-4/-/archive/v${RELEASE}/crafty-4-v${RELEASE}.zip" -o "crafty-4-v${RELEASE}.zip" $STD unzip crafty-4-v${RELEASE}.zip @@ -53,12 +46,12 @@ cp -a crafty-4-v${RELEASE}/. /opt/crafty-controller/crafty/crafty-4/ rm -rf crafty-4-v${RELEASE} cd /opt/crafty-controller/crafty -python3 -m venv .venv +$STD uv venv .venv chown -R crafty:crafty /opt/crafty-controller/ $STD sudo -u crafty bash -c ' source /opt/crafty-controller/crafty/.venv/bin/activate cd /opt/crafty-controller/crafty/crafty-4 - pip3 install --no-cache-dir -r requirements.txt + /opt/crafty-controller/crafty/.venv/bin/uv pip install --no-cache-dir -r requirements.txt ' msg_ok "Installed Craft-Controller and dependencies" @@ -83,8 +76,8 @@ $STD systemctl enable -q --now crafty-controller sleep 10 { echo "Crafty-Controller-Credentials" - echo "Username: $(grep -oP '(?<="username": ")[^"]*' /opt/crafty-controller/crafty/crafty-4/app/config/default-creds.txt)" - echo "Password: $(grep -oP '(?<="password": ")[^"]*' /opt/crafty-controller/crafty/crafty-4/app/config/default-creds.txt)" + echo "Username: $(grep -oP '(?<="username": \")[^\"]*' /opt/crafty-controller/crafty/crafty-4/app/config/default-creds.txt)" + echo "Password: $(grep -oP '(?<="password": \")[^\"]*' /opt/crafty-controller/crafty/crafty-4/app/config/default-creds.txt)" } >>~/crafty-controller.creds msg_ok "Crafty-Controller service started" diff --git a/install/deluge-install.sh b/install/deluge-install.sh index f8ebab681..21cac7b5b 100644 --- a/install/deluge-install.sh +++ b/install/deluge-install.sh @@ -17,21 +17,18 @@ msg_info "Installing Dependencies" $STD apt-get install -y python3-libtorrent msg_ok "Installed Dependencies" -msg_info "Setup Python3" -$STD apt-get install -y \ - python3 \ - python3-dev \ - python3-pip -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED -msg_ok "Setup Python3" +PYTHON_VERSION="3.12" setup_uv msg_info "Installing Deluge" -$STD pip install deluge[all] +mkdir -p /opt/deluge +$STD uv venv /opt/deluge/.venv +source /opt/deluge/.venv/bin/activate +$STD /opt/deluge/.venv/bin/uv pip install deluge[all] msg_ok "Installed Deluge" msg_info "Creating Service" -service_path="/etc/systemd/system/deluged.service" -echo "[Unit] +cat </etc/systemd/system/deluged.service +[Unit] Description=Deluge Bittorrent Client Daemon Documentation=man:deluged After=network-online.target @@ -39,15 +36,16 @@ After=network-online.target [Service] Type=simple UMask=007 -ExecStart=/usr/local/bin/deluged -d +ExecStart=/opt/deluge/.venv/bin/deluged -d Restart=on-failure TimeoutStopSec=300 [Install] -WantedBy=multi-user.target" >$service_path +WantedBy=multi-user.target +EOF -service_path="/etc/systemd/system/deluge-web.service" -echo "[Unit] +cat </etc/systemd/system/deluge-web.service +[Unit] Description=Deluge Bittorrent Client Web Interface Documentation=man:deluge-web After=deluged.service @@ -56,11 +54,12 @@ Wants=deluged.service [Service] Type=simple UMask=027 -ExecStart=/usr/local/bin/deluge-web -d +ExecStart=/opt/deluge/.venv/bin/deluge-web -d Restart=on-failure [Install] -WantedBy=multi-user.target" >$service_path +WantedBy=multi-u + systemctl enable --now -q deluged.service systemctl enable --now -q deluge-web.service msg_ok "Created Service" diff --git a/install/metube-install.sh b/install/metube-install.sh index 34910d449..bf1bc2ecc 100644 --- a/install/metube-install.sh +++ b/install/metube-install.sh @@ -1,8 +1,7 @@ #!/usr/bin/env bash # Copyright (c) 2021-2025 tteck -# Author: tteck -# Co-Author: MickLesk (Canbiz) +# Author: MickLesk (Canbiz) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/alexta69/metube @@ -28,14 +27,7 @@ $STD apt-get install -y --no-install-recommends \ ca-certificates msg_ok "Installed Dependencies" -msg_info "Setup Python3" -$STD apt-get install -y \ - python3 \ - python3-dev \ - python3-pip \ - python3-venv -msg_ok "Setup Python3" - +PYTHON_VERSION="3.12" setup_uv NODE_VERSION="22" install_node_and_modules msg_info "Installing MeTube" @@ -44,8 +36,9 @@ cd /opt/metube/ui $STD npm install $STD node_modules/.bin/ng build cd /opt/metube -$STD pip3 install pipenv -$STD pipenv install +$STD uv venv .venv +$STD .venv/bin/uv pip install pipenv +$STD .venv/bin/pipenv install mkdir -p /opt/metube_downloads /opt/metube_downloads/.metube /opt/metube_downloads/music /opt/metube_downloads/videos cat </opt/metube/.env DOWNLOAD_DIR=/opt/metube_downloads @@ -65,7 +58,7 @@ After=network.target Type=simple WorkingDirectory=/opt/metube EnvironmentFile=/opt/metube/.env -ExecStart=/usr/local/bin/pipenv run python3 app/main.py +ExecStart=/opt/metube/.venv/bin/pipenv run python3 app/main.py Restart=always User=root diff --git a/install/motioneye-install.sh b/install/motioneye-install.sh index 47b6f8ff7..d7e69ccf4 100644 --- a/install/motioneye-install.sh +++ b/install/motioneye-install.sh @@ -18,13 +18,7 @@ $STD apt-get install -y git $STD apt-get install -y cifs-utils msg_ok "Installed Dependencies" -msg_info "Setup Python3" -$STD apt-get install -y \ - python3 \ - python3-dev \ - python3-pip -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED -msg_ok "Setup Python3" +PYTHON_VERSION="3.12" setup_uv msg_info "Installing Motion" $STD apt-get install -y motion @@ -38,7 +32,9 @@ msg_ok "Installed FFmpeg" msg_info "Installing MotionEye" $STD apt-get update -$STD pip install git+https://github.com/motioneye-project/motioneye.git@dev +$STD uv venv /opt/motioneye/.venv +$STD /opt/motioneye/.venv/bin/uv pip install git+https://github.com/motioneye-project/motioneye.git@dev + mkdir -p /etc/motioneye chown -R root:root /etc/motioneye chmod -R 777 /etc/motioneye @@ -48,6 +44,8 @@ msg_ok "Installed MotionEye" msg_info "Creating Service" curl -fsSL "https://raw.githubusercontent.com/motioneye-project/motioneye/dev/motioneye/extra/motioneye.systemd" -o "/etc/systemd/system/motioneye.service" +sed -i 's|^ExecStart=.*|ExecStart=/opt/motioneye/.venv/bin/meyectl startserver -c /etc/motioneye/motioneye.conf|' /etc/systemd/system/motioneye.service +systemctl daemon-reexec systemctl enable -q --now motioneye msg_ok "Created Service" diff --git a/install/mylar3-install.sh b/install/mylar3-install.sh index cab578fbb..6bfa4aa5d 100644 --- a/install/mylar3-install.sh +++ b/install/mylar3-install.sh @@ -21,18 +21,16 @@ $STD apt-get install -y unrar rm /etc/apt/sources.list.d/non-free.list msg_ok "Installed Dependencies" -msg_info "Setup Python3" -$STD apt-get install -y python3-pip -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED -$STD pip install -U --no-cache-dir pip -msg_ok "Setup Python3" +PYTHON_VERSION="3.12" setup_uv msg_info "Installing ${APPLICATION}" mkdir -p /opt/mylar3 mkdir -p /opt/mylar3-data RELEASE=$(curl -fsSL https://api.github.com/repos/mylar3/mylar3/releases/latest | jq -r '.tag_name') curl -fsSL "https://github.com/mylar3/mylar3/archive/refs/tags/${RELEASE}.tar.gz" | tar -xz --strip-components=1 -C /opt/mylar3 -$STD pip install --no-cache-dir -r /opt/mylar3/requirements.txt +cd /opt/mylar3 +$STD uv venv .venv +$STD .venv/bin/uv pip install --no-cache-dir -r requirements.txt echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed ${APPLICATION}" @@ -43,7 +41,7 @@ Description=Mylar3 Service After=network-online.target [Service] -ExecStart=/usr/bin/python3 /opt/mylar3/Mylar.py --daemon --nolaunch --datadir=/opt/mylar3-data +ExecStart=/opt/mylar3/.venv/bin/python /opt/mylar3/Mylar.py --daemon --nolaunch --datadir=/opt/mylar3-data GuessMainPID=no Type=forking Restart=on-failure diff --git a/install/openwebui-install.sh b/install/openwebui-install.sh index 5f2908a7d..4d1949d7a 100644 --- a/install/openwebui-install.sh +++ b/install/openwebui-install.sh @@ -20,19 +20,15 @@ $STD apt-get install -y \ ffmpeg msg_ok "Installed Dependencies" -msg_info "Setup Python3" -$STD apt-get install -y --no-install-recommends \ - python3 \ - python3-pip -msg_ok "Setup Python3" - +PYTHON_VERSION="3.12" setup_uv NODE_VERSION="22" install_node_and_modules msg_info "Installing Open WebUI (Patience)" $STD git clone https://github.com/open-webui/open-webui.git /opt/open-webui cd /opt/open-webui/backend -$STD pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu -$STD pip3 install -r requirements.txt -U +$STD uv venv /opt/open-webui/.venv +$STD /opt/open-webui/.venv/bin/uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu +$STD /opt/open-webui/.venv/bin/uv pip install -r requirements.txt -U cd /opt/open-webui cp .env.example .env cat </opt/open-webui/.env diff --git a/install/paperless-ai-install.sh b/install/paperless-ai-install.sh index f4972ef46..4520b3ef8 100644 --- a/install/paperless-ai-install.sh +++ b/install/paperless-ai-install.sh @@ -18,12 +18,9 @@ $STD apt-get install -y \ build-essential msg_ok "Installed Dependencies" -msg_info "Installing Python3" -$STD apt-get install -y \ - python3-pip -msg_ok "Installed Python3" +PYTHON_VERSION="3.12" setup_uv -install_node_and_modules +NODE_VERSION="22" install_node_and_modules msg_info "Setup Paperless-AI" cd /opt @@ -32,7 +29,8 @@ curl -fsSL "https://github.com/clusterzx/paperless-ai/archive/refs/tags/v${RELEA $STD unzip v${RELEASE}.zip mv paperless-ai-${RELEASE} /opt/paperless-ai cd /opt/paperless-ai -$STD pip install --no-cache-dir -r requirements.txt +$STD uv venv .venv +$STD .venv/bin/uv pip install --no-cache-dir -r requirements.txt mkdir -p data/chromadb $STD npm install mkdir -p /opt/paperless-ai/data @@ -87,7 +85,7 @@ After=network.target [Service] WorkingDirectory=/opt/paperless-ai -ExecStart=/usr/bin/python3 main.py --host 0.0.0.0 --port 8000 --initialize +ExecStart=/opt/paperless-ai/.venv/bin/python main.py --host 0.0.0.0 --port 8000 --initialize Restart=always [Install]