Skip to content

Migrate all Python3 Scripts to uv #4961

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 58 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
246936d
Update build.func
MickLesk Jun 3, 2025
5551c27
fix testing preparation
MickLesk Jun 3, 2025
44c98dd
migrations
MickLesk Jun 3, 2025
ddb01f6
PYTHON_VERSION="3.12" setup_uv
MickLesk Jun 3, 2025
128c84a
more uv migrations
MickLesk Jun 3, 2025
96511db
next migrations
MickLesk Jun 3, 2025
5965a42
more uv migrations
MickLesk Jun 3, 2025
a7f4bf2
more uv mig
MickLesk Jun 3, 2025
594dc3c
Update netbox-install.sh
MickLesk Jun 3, 2025
3b1a17c
more uv migs
MickLesk Jun 4, 2025
9d9b810
more migrations
MickLesk Jun 4, 2025
a8ddfad
more uv migrations
MickLesk Jun 4, 2025
647af55
more uv migs
MickLesk Jun 4, 2025
7e8083f
more uv migs
MickLesk Jun 4, 2025
2da5f5e
Update slskd-install.sh
MickLesk Jun 4, 2025
a151d26
Update nginxproxymanager-install.sh
MickLesk Jun 4, 2025
e082478
more uv
MickLesk Jun 4, 2025
3b91274
AdventureLog: Full UV Mig
MickLesk Jun 4, 2025
cd4a9d4
Archivebox: UV Migration
MickLesk Jun 4, 2025
2cc17f4
optimize uv python install
MickLesk Jun 4, 2025
2cfaaa4
fix python install for uv
MickLesk Jun 4, 2025
dbd08c7
various improvements on uv setup
MickLesk Jun 4, 2025
506ce07
fixes
MickLesk Jun 4, 2025
b080c94
Update archivebox-install.sh
MickLesk Jun 4, 2025
130af1a
change paths for testing
MickLesk Jun 4, 2025
90e8a73
Update adventurelog-install.sh
MickLesk Jun 4, 2025
31006e2
Update archivebox-install.sh
MickLesk Jun 4, 2025
97e8775
Update tools.func
MickLesk Jun 4, 2025
7923132
Update adventurelog-install.sh
MickLesk Jun 4, 2025
581cbae
Update archivebox-install.sh
MickLesk Jun 4, 2025
961464e
Update adventurelog-install.sh
MickLesk Jun 4, 2025
68b4ff6
fix uv install
MickLesk Jun 4, 2025
88cae89
some fixes with venv
MickLesk Jun 4, 2025
00fe491
fix pip for adventurelog
MickLesk Jun 4, 2025
3b9160a
some fixes
MickLesk Jun 4, 2025
e5f2535
remove "This will create an ... LXC"
MickLesk Jun 4, 2025
201d2ae
Update archivebox-install.sh
MickLesk Jun 4, 2025
591c37c
harmonize .venv
MickLesk Jun 4, 2025
171626e
Change from python3.12 to python3 for venv
michelroegl-brunner Jun 4, 2025
11d6a33
Change user
michelroegl-brunner Jun 4, 2025
1a5fdc0
fixes
MickLesk Jun 4, 2025
4b5b1a3
add build-essential to deluge
MickLesk Jun 4, 2025
9ed66d7
some fixes
MickLesk Jun 4, 2025
c675b23
fix tasmocompiler
MickLesk Jun 4, 2025
083810f
more uv migs
MickLesk Jun 4, 2025
82a0b1f
testing
MickLesk Jun 5, 2025
2664b35
more migs
MickLesk Jun 5, 2025
665a47e
more
MickLesk Jun 5, 2025
dbfddc2
fix deluge
MickLesk Jun 5, 2025
94a5502
fixes
MickLesk Jun 5, 2025
f0849a4
Update wger-install.sh
MickLesk Jun 5, 2025
9e84828
fixes
MickLesk Jun 5, 2025
7ebfebc
test sabnzd
MickLesk Jun 5, 2025
1fd8713
test
MickLesk Jun 5, 2025
dbb268e
Update tools.func
MickLesk Jun 5, 2025
0c04d89
MeTube to Python 3.13
tremor021 Jun 6, 2025
84e93cd
Immich UV test (#5032)
vhsdream Jun 7, 2025
46dadba
Update motioneye-install.sh
MickLesk Jun 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions ct/adventurelog.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/python_to_uv/misc/build.func)
# Copyright (c) 2021-2025 tteck
# Author: MickLesk (Canbiz)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
Expand Down Expand Up @@ -27,6 +27,8 @@ function update_script() {
msg_error "No ${APP} Installation Found!"
exit
fi
PYTHON_VERSION="3.12" setup_uv

RELEASE=$(curl -fsSL https://api.github.com/repos/seanmorley15/AdventureLog/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Stopping Services"
Expand All @@ -43,10 +45,16 @@ function update_script() {
mv /opt/adventurelog-backup/backend/server/.env /opt/adventurelog/backend/server/.env
mv /opt/adventurelog-backup/backend/server/media /opt/adventurelog/backend/server/media
cd /opt/adventurelog/backend/server
$STD pip install --upgrade pip
$STD pip install -r requirements.txt
$STD python3 manage.py collectstatic --noinput
$STD python3 manage.py migrate
$STD uv venv --python "$UV_PYTHON_VERSION" .venv
if grep -q "ExecStart=.*python3 manage.py runserver" /etc/systemd/system/adventurelog-backend.service; then
sed -i "s|ExecStart=.*python3 manage.py runserver|ExecStart=$(pwd)/.venv/bin/python manage.py runserver|" /etc/systemd/system/adventurelog-backend.service
systemctl daemon-reload
fi

$STD uv pip install --upgrade pip --python=.venv/bin/python
$STD uv pip install -r requirements.txt --python=.venv/bin/python
$STD uv run --python=.venv/bin/python python manage.py collectstatic --noinput
$STD uv run --python=.venv/bin/python python manage.py migrate

mv /opt/adventurelog-backup/frontend/.env /opt/adventurelog/frontend/.env
cd /opt/adventurelog/frontend
Expand Down
64 changes: 40 additions & 24 deletions ct/archivebox.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/python_to_uv/misc/build.func)
# Copyright (c) 2021-2025 tteck
# Author: tteck
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
Expand All @@ -20,29 +20,45 @@ color
catch_errors

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/archivebox ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Stopping ${APP}"
systemctl stop archivebox
msg_ok "Stopped ${APP}"

msg_info "Updating ${APP}"
cd /opt/archivebox/data
pip install --upgrade --ignore-installed archivebox
sudo -u archivebox archivebox init
msg_ok "Updated ${APP}"

msg_info "Starting ${APP}"
systemctl start archivebox
msg_ok "Started ${APP}"

msg_ok "Updated Successfully"
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/archivebox ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Stopping ${APP}"
systemctl stop archivebox
msg_ok "Stopped ${APP}"

msg_info "Updating ${APP}"
cd /opt/archivebox
$STD uv venv --python "$UV_PYTHON_VERSION" .venv

if [[ -f /opt/archivebox/uv.lock ]]; then
cp /opt/archivebox/uv.lock /opt/archivebox/data/ || true
fi

cd /opt/archivebox/data
$STD ../.venv/bin/uv sync

msg_info "Running ArchiveBox Setup"
sudo -u archivebox ../.venv/bin/playwright install-deps chromium
sudo -u archivebox ../.venv/bin/playwright install chromium
sudo -u archivebox ../.venv/bin/archivebox init
msg_ok "ArchiveBox Updated"

if grep -q "ExecStart=/usr/local/bin/archivebox" /etc/systemd/system/archivebox.service; then
sed -i "s|ExecStart=/usr/local/bin/archivebox|ExecStart=/opt/archivebox/.venv/bin/archivebox|" /etc/systemd/system/archivebox.service
systemctl daemon-reload
fi

msg_info "Starting ${APP}"
systemctl start archivebox
msg_ok "Started ${APP}"

msg_ok "Updated Successfully"
exit
}

start
Expand All @@ -52,4 +68,4 @@ description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8000/admin/login${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8000/admin/login${CL}"
2 changes: 1 addition & 1 deletion ct/babybuddy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/python_to_uv/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
Expand Down
26 changes: 13 additions & 13 deletions ct/bazarr.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/python_to_uv/misc/build.func)
# Copyright (c) 2021-2025 tteck
# Author: tteck (tteckster)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
Expand All @@ -20,18 +20,18 @@ color
catch_errors

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /var/lib/bazarr/ ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Updating $APP LXC"
$STD apt-get update
$STD apt-get -y upgrade
msg_ok "Updated $APP LXC"
header_info
check_container_storage
check_container_resources
if [[ ! -d /var/lib/bazarr/ ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Updating $APP LXC"
$STD apt-get update
$STD apt-get -y upgrade
msg_ok "Updated $APP LXC"
exit
}

start
Expand All @@ -41,4 +41,4 @@ description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:6767${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:6767${CL}"
4 changes: 2 additions & 2 deletions ct/calibre-web.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/python_to_uv/misc/build.func)
# Copyright (c) 2021-2025 tteck
# Author: tteck (tteckster) | Co-Author: remz1337
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
Expand Down Expand Up @@ -135,4 +135,4 @@ description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8083${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8083${CL}"
4 changes: 2 additions & 2 deletions ct/changedetection.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/python_to_uv/misc/build.func)
# Copyright (c) 2021-2025 tteck
# Author: tteck (tteckster)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
Expand Down Expand Up @@ -74,4 +74,4 @@ description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5000${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5000${CL}"
2 changes: 1 addition & 1 deletion ct/crafty-controller.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/python_to_uv/misc/build.func)
# Copyright (c) 2021-2025 community-scripts
# Author: CrazyWolf13
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
Expand Down
2 changes: 1 addition & 1 deletion ct/create_lxc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Author: tteck (tteckster)
# Co-Author: MickLesk
# License: MIT
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# https://github.com/community-scripts/ProxmoxVE/raw/python_to_uv/LICENSE

# This sets verbose mode if the global variable is set to "yes"
# if [ "$VERBOSE" == "yes" ]; then set -x; fi
Expand Down
26 changes: 13 additions & 13 deletions ct/deluge.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/python_to_uv/misc/build.func)
# Copyright (c) 2021-2025 tteck
# Author: tteck (tteckster)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
Expand All @@ -20,18 +20,18 @@ color
catch_errors

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/systemd/system/deluged.service ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Updating $APP LXC"
$STD apt-get update
pip3 install deluge[all] --upgrade
msg_ok "Updated $APP LXC"
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/systemd/system/deluged.service ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Updating $APP LXC"
$STD apt-get update
pip3 install deluge[all] --upgrade
msg_ok "Updated $APP LXC"
exit
}

start
Expand All @@ -41,4 +41,4 @@ description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8112${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8112${CL}"
2 changes: 1 addition & 1 deletion ct/documenso.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/python_to_uv/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
Expand Down
4 changes: 2 additions & 2 deletions ct/esphome.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/python_to_uv/misc/build.func)
# Copyright (c) 2021-2025 tteck
# Author: tteck (tteckster)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
Expand Down Expand Up @@ -52,4 +52,4 @@ description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:6052${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:6052${CL}"
2 changes: 1 addition & 1 deletion ct/grist.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/python_to_uv/misc/build.func)
# Source: https://github.com/gristlabs/grist-core

APP="Grist"
Expand Down
2 changes: 1 addition & 1 deletion ct/homeassistant.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/python_to_uv/misc/build.func)
# Copyright (c) 2021-2025 tteck
# Author: tteck (tteckster)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
Expand Down
68 changes: 34 additions & 34 deletions ct/homer.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/python_to_uv/misc/build.func)
# Copyright (c) 2021-2025 tteck
# Author: tteck (tteckster)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
Expand All @@ -20,44 +20,44 @@ color
catch_errors

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/homer ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Stopping ${APP}"
systemctl stop homer
msg_ok "Stopped ${APP}"
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/homer ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Stopping ${APP}"
systemctl stop homer
msg_ok "Stopped ${APP}"

msg_info "Backing up assets directory"
cd ~
mkdir -p assets-backup
cp -R /opt/homer/assets/. assets-backup
msg_ok "Backed up assets directory"
msg_info "Backing up assets directory"
cd ~
mkdir -p assets-backup
cp -R /opt/homer/assets/. assets-backup
msg_ok "Backed up assets directory"

msg_info "Updating ${APP}"
rm -rf /opt/homer/*
cd /opt/homer
curl -fsSL "https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip" -o $(basename "https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip")
$STD unzip homer.zip
msg_ok "Updated ${APP}"
msg_info "Updating ${APP}"
rm -rf /opt/homer/*
cd /opt/homer
curl -fsSL "https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip" -o $(basename "https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip")
$STD unzip homer.zip
msg_ok "Updated ${APP}"

msg_info "Restoring assets directory"
cd ~
cp -Rf assets-backup/. /opt/homer/assets/
msg_ok "Restored assets directory"
msg_info "Restoring assets directory"
cd ~
cp -Rf assets-backup/. /opt/homer/assets/
msg_ok "Restored assets directory"

msg_info "Cleaning"
rm -rf assets-backup /opt/homer/homer.zip
msg_ok "Cleaned"
msg_info "Cleaning"
rm -rf assets-backup /opt/homer/homer.zip
msg_ok "Cleaned"

msg_info "Starting ${APP}"
systemctl start homer
msg_ok "Started ${APP}"
msg_ok "Updated Successfully"
exit
msg_info "Starting ${APP}"
systemctl start homer
msg_ok "Started ${APP}"
msg_ok "Updated Successfully"
exit
}

start
Expand Down
Loading