diff --git a/ct/audiomuse-ai.sh b/ct/audiomuse-ai.sh index 2efd1a7d3..1de1da8d3 100644 --- a/ct/audiomuse-ai.sh +++ b/ct/audiomuse-ai.sh @@ -41,6 +41,7 @@ function update_script() { AUDIOMUSE_BACKEND="$(cat /opt/audiomuse-ai_data/.backend 2>/dev/null || echo cpu)" REQ_COMMON="common.txt" + PY_VERSION="3.12" case "$AUDIOMUSE_BACKEND" in gpu) REQ_ACCEL="gpu.txt" @@ -49,6 +50,7 @@ function update_script() { cpu-noavx2) REQ_COMMON="common-noavx2.txt" REQ_ACCEL="cpu-noavx2.txt" + PY_VERSION="3.11" ;; *) REQ_ACCEL="cpu.txt" @@ -57,7 +59,7 @@ function update_script() { msg_info "Updating Python Environment (${AUDIOMUSE_BACKEND})" cd /opt/audiomuse-ai - $STD uv venv --seed --python 3.12 /opt/audiomuse-ai/.venv + $STD uv venv --seed --python "$PY_VERSION" /opt/audiomuse-ai/.venv $STD uv pip install --python /opt/audiomuse-ai/.venv \ -r "/opt/audiomuse-ai/requirements/${REQ_COMMON}" \ -r "/opt/audiomuse-ai/requirements/${REQ_ACCEL}" diff --git a/install/audiomuse-ai-install.sh b/install/audiomuse-ai-install.sh index cdfaee765..21408ae18 100644 --- a/install/audiomuse-ai-install.sh +++ b/install/audiomuse-ai-install.sh @@ -42,6 +42,7 @@ if [[ "$var_backend" == "auto" ]]; then fi REQ_COMMON="common.txt" +PY_VERSION="3.12" case "$var_backend" in gpu) REQ_ACCEL="gpu.txt" @@ -53,6 +54,7 @@ cpu) cpu-noavx2) REQ_COMMON="common-noavx2.txt" REQ_ACCEL="cpu-noavx2.txt" + PY_VERSION="3.11" ;; *) msg_error "Unknown var_backend '${var_backend}' (expected auto, gpu, cpu or cpu-noavx2)" @@ -62,7 +64,7 @@ esac msg_info "Setting up Python Environment (${var_backend}, Patience)" cd /opt/audiomuse-ai -$STD uv venv --seed --python 3.12 /opt/audiomuse-ai/.venv +$STD uv venv --seed --python "$PY_VERSION" /opt/audiomuse-ai/.venv $STD uv pip install --python /opt/audiomuse-ai/.venv \ -r "/opt/audiomuse-ai/requirements/${REQ_COMMON}" \ -r "/opt/audiomuse-ai/requirements/${REQ_ACCEL}"