Use Python 3.12 under venv via uv if system is 3.13+

Immich currently does not support Python 3.13+.

This fixes Debian 13 support.

Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
This commit is contained in:
Juhyung Park
2025-11-17 06:29:32 +09:00
parent f286f2bed7
commit 7430e98fb6

View File

@@ -117,6 +117,13 @@ python3 -m venv $APP/machine-learning/venv
# Initiate subshell to setup venv
. $APP/machine-learning/venv/bin/activate
pip3 install uv
if [ "$(python3 -c 'import sys; print(sys.version_info[:2] > (3, 12))')" = "True" ]; then
echo "Python > 3.12, pinning to 3.12"
uv venv --python 3.12 --allow-existing $APP/machine-learning/venv
# Reload
deactivate
. $APP/machine-learning/venv/bin/activate
fi
cd machine-learning
uv sync --no-install-project --no-install-workspace --extra cpu --no-cache --active --link-mode=copy
cd ..