Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
66 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
3958172
fixes
MickLesk Jun 23, 2025
72d0a01
fixes
MickLesk Jun 24, 2025
729e213
Update prometheus-pve-exporter.sh
MickLesk Jun 24, 2025
6eb3b84
fixes
MickLesk Jun 24, 2025
dde3331
Update spoolman-install.sh
MickLesk Jun 24, 2025
3a7fd87
update tools.func for migration
MickLesk Jun 24, 2025
6ade76b
Update spoolman-install.sh
MickLesk Jun 24, 2025
8dbd9aa
Update spoolman-install.sh
MickLesk Jun 24, 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
Prev Previous commit
Next Next commit
test sabnzd
  • Loading branch information
MickLesk committed Jun 5, 2025
commit 7ebfebce74815e204e704683ae48a8c3c6e1fa37
4 changes: 3 additions & 1 deletion install/babybuddy-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ $STD apt-get install -y \
nginx
msg_ok "Installed Dependencies"

PYTHON_VERSION="3.12" setup_uv
setup_uv

msg_info "Installing Babybuddy"
RELEASE=$(curl -fsSL https://api.github.com/repos/babybuddy/babybuddy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
Expand All @@ -31,6 +31,8 @@ mkdir -p /opt/{babybuddy,data}
curl -fsSL "https://github.com/babybuddy/babybuddy/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
tar zxf "$temp_file" --strip-components=1 -C /opt/babybuddy
cd /opt/babybuddy
setup_uv

$STD uv venv /opt/babybuddy/.venv
$STD /opt/babybuddy/.venv/bin/python -m ensurepip --upgrade
$STD /opt/babybuddy/.venv/bin/python -m pip install --upgrade pip
Expand Down
8 changes: 2 additions & 6 deletions install/sabnzbd-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ $STD apt-get install -y \
p7zip-full
msg_ok "Installed Dependencies"

PYTHON_VERSION="3.12" setup_uv

msg_info "Setup Unrar"
cat <<EOF >/etc/apt/sources.list.d/non-free.list
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
Expand All @@ -37,10 +35,8 @@ cd /opt/sabnzbd
temp_file=$(mktemp)
curl -fsSL "https://github.com/sabnzbd/sabnzbd/releases/download/${RELEASE}/SABnzbd-${RELEASE}-src.tar.gz" -o "$temp_file"
tar -xzf "$temp_file" -C /opt/sabnzbd --strip-components=1
$STD uv venv /opt/sabnzbd/.venv
$STD /opt/sabnzbd/.venv/bin/python -m ensurepip --upgrade
$STD /opt/sabnzbd/.venv/bin/python -m pip install --upgrade pip
$STD /opt/sabnzbd/.venv/bin/python -m pip install -r requirements.txt
setup_uv VENV_FOLDER="/opt/sabnzbd/.venv" REQUIREMENTS_FILE="requirements.txt" PYTHON_VERSION="3.12" setup_uv_venv

echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed SABnzbd"

Expand Down
67 changes: 50 additions & 17 deletions misc/tools.func
Original file line number Diff line number Diff line change
Expand Up @@ -1081,31 +1081,64 @@ function setup_uv() {
rm -rf "$TMP_DIR"
ensure_usr_local_bin_persist
msg_ok "uv $LATEST_VERSION installed"
}

# ------------------------------------------------------------------------------
# Creates a uv-based venv with optional Python version and installs dependencies
# ------------------------------------------------------------------------------

function setup_uv_venv() {
local VENV_FOLDER="${VENV_FOLDER:-/opt/app/.venv}"
local REQUIREMENTS_FILE="${REQUIREMENTS_FILE:-requirements.txt}"
local ENABLE_PIP_UPGRADE="${ENABLE_PIP_UPGRADE:-1}"
local ENABLE_ENSUREPIP="${ENABLE_ENSUREPIP:-1}"

# Fallback auf globale PYTHON_VERSION
local PYTHON_VERSION="${PYTHON_VERSION:-}"

# Optional: install specific Python version
if [[ -n "${PYTHON_VERSION:-}" ]]; then
$STD msg_info "Ensuring Python $PYTHON_VERSION is available via uv..."
setup_uv || return 1

# Wenn PYTHON_VERSION gesetzt, installiere gezielt
if [[ -n "$PYTHON_VERSION" ]]; then
export PYTHON_VERSION="$PYTHON_VERSION"
setup_uv || return 1
fi

$STD msg_info "Creating uv venv in $VENV_FOLDER"
if ! $STD uv venv "$VENV_FOLDER"; then
msg_error "Failed to create uv venv"
return 1
fi

local VERSION_MATCH
VERSION_MATCH=$(uv python list --only-downloads |
grep -E "^cpython-${PYTHON_VERSION//./\\.}\.[0-9]+-linux" |
cut -d'-' -f2 | sort -V | tail -n1)
local PYTHON="$VENV_FOLDER/bin/python"

if [[ -z "$VERSION_MATCH" ]]; then
msg_error "No matching Python $PYTHON_VERSION.x version found via uv"
if [[ "$ENABLE_ENSUREPIP" == "1" ]]; then
$STD msg_info "Running ensurepip"
if ! $STD "$PYTHON" -m ensurepip --upgrade; then
msg_error "ensurepip failed"
return 1
fi
fi

if uv python list | grep -q "cpython-${VERSION_MATCH}-linux.*uv/python"; then
$STD msg_ok "Python $VERSION_MATCH already installed via uv"
else
if ! $STD uv python install "$VERSION_MATCH"; then
msg_error "Failed to install Python $VERSION_MATCH via uv"
return 1
fi
msg_ok "Installed Python $VERSION_MATCH"
if [[ "$ENABLE_PIP_UPGRADE" == "1" ]]; then
$STD msg_info "Upgrading pip"
if ! $STD "$PYTHON" -m pip install --upgrade pip; then
msg_error "pip upgrade failed"
return 1
fi
fi

if [[ -f "$REQUIREMENTS_FILE" ]]; then
$STD msg_info "Installing requirements from $REQUIREMENTS_FILE"
if ! $STD "$PYTHON" -m pip install -r "$REQUIREMENTS_FILE"; then
msg_error "Failed to install requirements"
return 1
fi
else
msg_info "No requirements file found at $REQUIREMENTS_FILE – skipping"
fi

msg_ok "uv venv setup complete in $VENV_FOLDER"
}

# ------------------------------------------------------------------------------
Expand Down