From b67a82123e78d365139dbc30719575b4968d5095 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 29 Jan 2026 08:37:54 -0500 Subject: [PATCH] Immich: v2.5.0 (#11240) --- ct/immich.sh | 17 ++++--- install/immich-install.sh | 102 +++++++++++++++++++------------------- 2 files changed, 61 insertions(+), 58 deletions(-) diff --git a/ct/immich.sh b/ct/immich.sh index c19ff4dd7..dd2a5a794 100644 --- a/ct/immich.sh +++ b/ct/immich.sh @@ -68,7 +68,7 @@ EOF if [[ ! -f /etc/apt/sources.list.d/mise.list ]]; then msg_info "Installing Mise" curl -fSs https://mise.jdx.dev/gpg-key.pub | tee /etc/apt/keyrings/mise-archive-keyring.pub 1>/dev/null - echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.pub arch=amd64] https://mise.jdx.dev/deb stable main" | tee /etc/apt/sources.list.d/mise.list + echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.pub arch=amd64] https://mise.jdx.dev/deb stable main" >/etc/apt/sources.list.d/mise.list $STD apt update $STD apt install -y mise msg_ok "Installed Mise" @@ -112,7 +112,7 @@ EOF msg_ok "Image-processing libraries up to date" fi - RELEASE="2.4.1" + RELEASE="2.5.0" if check_for_gh_release "immich" "immich-app/immich" "${RELEASE}"; then msg_info "Stopping Services" systemctl stop immich-web @@ -167,7 +167,7 @@ EOF CLEAN_INSTALL=1 fetch_and_deploy_gh_release "immich" "immich-app/immich" "tarball" "v${RELEASE}" "$SRC_DIR" - msg_info "Updating ${APP} web and microservices" + msg_info "Updating Immich web and microservices" cd "$SRC_DIR"/server export COREPACK_ENABLE_DOWNLOAD_PROMPT=0 export CI=1 @@ -209,7 +209,7 @@ EOF mkdir -p "$PLUGIN_DIR" cp -r ./dist "$PLUGIN_DIR"/dist cp ./manifest.json "$PLUGIN_DIR" - msg_ok "Updated ${APP} server, web, cli and plugins" + msg_ok "Updated Immich server, web, cli and plugins" cd "$SRC_DIR"/machine-learning mkdir -p "$ML_DIR" && chown -R immich:immich "$ML_DIR" @@ -217,12 +217,13 @@ EOF export VIRTUAL_ENV="${ML_DIR}"/ml-venv if [[ -f ~/.openvino ]]; then msg_info "Updating HW-accelerated machine-learning" - $STD sudo --preserve-env=VIRTUAL_ENV -nu immich uv sync --extra openvino --active -n -p python3.11 --managed-python - patchelf --clear-execstack "${VIRTUAL_ENV}/lib/python3.11/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.cpython-311-x86_64-linux-gnu.so" + $STD uv add --no-sync --optional openvino onnxruntime-openvino==1.20.0 --active -n -p python3.12 --managed-python + $STD sudo --preserve-env=VIRTUAL_ENV -nu immich uv sync --extra openvino --no-dev --active --link-mode copy -n -p python3.12 --managed-python + patchelf --clear-execstack "${VIRTUAL_ENV}/lib/python3.12/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.cpython-312-x86_64-linux-gnu.so" msg_ok "Updated HW-accelerated machine-learning" else msg_info "Updating machine-learning" - $STD sudo --preserve-env=VIRTUAL_ENV -nu immich uv sync --extra cpu --active -n -p python3.11 --managed-python + $STD sudo --preserve-env=VIRTUAL_ENV -nu immich uv sync --extra cpu --no-dev --active --link-mode copy -n -p python3.11 --managed-python msg_ok "Updated machine-learning" fi cd "$SRC_DIR" @@ -241,8 +242,8 @@ EOF ln -s "$GEO_DIR" "$APP_DIR" chown -R immich:immich "$INSTALL_DIR" - msg_ok "Updated ${APP} to v${RELEASE}" systemctl restart immich-ml immich-web + msg_ok "Updated successfully!" fi exit } diff --git a/install/immich-install.sh b/install/immich-install.sh index e4b55ef52..339f79c60 100644 --- a/install/immich-install.sh +++ b/install/immich-install.sh @@ -13,6 +13,42 @@ setting_up_container network_check update_os +echo "" +echo "" +echo -e "🤖 ${BL}Immich Machine Learning Options${CL}" +echo "─────────────────────────────────────────" +echo "Please choose your machine-learning type:" +echo "" +echo " 1) CPU only (default)" +echo " 2) Intel OpenVINO (requires GPU passthrough)" +echo "" + +read -r -p "${TAB3}Select machine-learning type [1]: " ML_TYPE +ML_TYPE="${ML_TYPE:-1}" +if [[ "$ML_TYPE" == "2" ]]; then + msg_info "Installing OpenVINO dependencies" + touch ~/.openvino + $STD apt install -y --no-install-recommends patchelf + tmp_dir=$(mktemp -d) + $STD pushd "$tmp_dir" + curl -fsSLO https://raw.githubusercontent.com/immich-app/base-images/refs/heads/main/server/Dockerfile + readarray -t INTEL_URLS < <( + sed -n "/intel-[igc|opencl]/p" ./Dockerfile | awk '{print $2}' + sed -n "/libigdgmm12/p" ./Dockerfile | awk '{print $3}' + ) + for url in "${INTEL_URLS[@]}"; do + curl -fsSLO "$url" + done + $STD apt install -y ./libigdgmm12*.deb + rm ./libigdgmm12*.deb + $STD apt install -y ./*.deb + $STD apt-mark hold libigdgmm12 + $STD popd + rm -rf "$tmp_dir" + dpkg-query -W -f='${Version}\n' intel-opencl-icd >~/.intel_version + msg_ok "Installed OpenVINO dependencies" +fi + setup_uv msg_info "Installing dependencies" @@ -86,36 +122,11 @@ msg_ok "Dependencies Installed" msg_info "Installing Mise" curl -fSs https://mise.jdx.dev/gpg-key.pub | tee /etc/apt/keyrings/mise-archive-keyring.pub 1>/dev/null -echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.pub arch=amd64] https://mise.jdx.dev/deb stable main" | tee /etc/apt/sources.list.d/mise.list +echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.pub arch=amd64] https://mise.jdx.dev/deb stable main" >/etc/apt/sources.list.d/mise.list $STD apt update $STD apt install -y mise msg_ok "Installed Mise" -read -r -p "${TAB3}Install OpenVINO dependencies for Intel HW-accelerated machine-learning? y/N " prompt -if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then - msg_info "Installing OpenVINO dependencies" - touch ~/.openvino - $STD apt install -y --no-install-recommends patchelf - tmp_dir=$(mktemp -d) - $STD pushd "$tmp_dir" - curl -fsSLO https://raw.githubusercontent.com/immich-app/base-images/refs/heads/main/server/Dockerfile - readarray -t INTEL_URLS < <( - sed -n "/intel-[igc|opencl]/p" ./Dockerfile | awk '{print $2}' - sed -n "/libigdgmm12/p" ./Dockerfile | awk '{print $3}' - ) - for url in "${INTEL_URLS[@]}"; do - curl -fsSLO "$url" - done - $STD apt install -y ./libigdgmm12*.deb - rm ./libigdgmm12*.deb - $STD apt install -y ./*.deb - $STD apt-mark hold libigdgmm12 - $STD popd - rm -rf "$tmp_dir" - dpkg-query -W -f='${Version}\n' intel-opencl-icd >~/.intel_version - msg_ok "Installed OpenVINO dependencies" -fi - msg_info "Configuring Debian Testing Repo" sed -i 's/ trixie-updates/ trixie-updates testing/g' /etc/apt/sources.list.d/debian.sources cat </etc/apt/preferences.d/preferences @@ -137,28 +148,17 @@ PNPM_VERSION="$(curl -fsSL "https://raw.githubusercontent.com/immich-app/immich/ NODE_VERSION="24" NODE_MODULE="pnpm@${PNPM_VERSION}" setup_nodejs PG_VERSION="16" PG_MODULES="pgvector" setup_postgresql -msg_info "Setting up Postgresql Database" VCHORD_RELEASE="0.5.3" +msg_info "Installing Vectorchord v${VCHORD_RELEASE}" curl -fsSL "https://github.com/tensorchord/VectorChord/releases/download/${VCHORD_RELEASE}/postgresql-16-vchord_${VCHORD_RELEASE}-1_amd64.deb" -o vchord.deb $STD apt install -y ./vchord.deb rm vchord.deb echo "$VCHORD_RELEASE" >~/.vchord_version -DB_NAME="immich" -DB_USER="immich" -DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c18) +msg_ok "Installed Vectorchord v${VCHORD_RELEASE}" + sed -i -e "/^#shared_preload/s/^#//;/^shared_preload/s/''/'vchord.so'/" /etc/postgresql/16/main/postgresql.conf systemctl restart postgresql.service -$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH ENCRYPTED PASSWORD '$DB_PASS';" -$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" -$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME to $DB_USER;" -$STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;" -{ - echo "${APPLICATION} DB Credentials" - echo "Database User: $DB_USER" - echo "Database Password: $DB_PASS" - echo "Database Name: $DB_NAME" -} >>~/"$APPLICATION".creds -msg_ok "Set up Postgresql Database" +PG_DB_NAME="immich" PG_DB_USER="immich" PG_DB_GRANT_SUPERUSER="true" PG_DB_SKIP_ALTER_ROLE="true" setup_postgresql_db msg_info "Compiling Custom Photo-processing Library (extreme patience)" LD_LIBRARY_PATH=/usr/local/lib @@ -296,9 +296,9 @@ GEO_DIR="${INSTALL_DIR}/geodata" mkdir -p "$INSTALL_DIR" mkdir -p {"${APP_DIR}","${UPLOAD_DIR}","${GEO_DIR}","${INSTALL_DIR}"/cache} -fetch_and_deploy_gh_release "immich" "immich-app/immich" "tarball" "v2.4.1" "$SRC_DIR" +fetch_and_deploy_gh_release "immich" "immich-app/immich" "tarball" "v2.5.0" "$SRC_DIR" -msg_info "Installing ${APPLICATION} (patience)" +msg_info "Installing Immich (patience)" cd "$SRC_DIR"/server export COREPACK_ENABLE_DOWNLOAD_PROMPT=0 @@ -347,12 +347,13 @@ mkdir -p "$ML_DIR" && chown -R immich:immich "$INSTALL_DIR" export VIRTUAL_ENV="${ML_DIR}/ml-venv" if [[ -f ~/.openvino ]]; then msg_info "Installing HW-accelerated machine-learning" - $STD sudo --preserve-env=VIRTUAL_ENV -nu immich uv sync --extra openvino --active -n -p python3.11 --managed-python - patchelf --clear-execstack "${VIRTUAL_ENV}/lib/python3.11/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.cpython-311-x86_64-linux-gnu.so" + $STD uv add --no-sync --optional openvino onnxruntime-openvino==1.20.0 --active -n -p python3.12 --managed-python + $STD sudo --preserve-env=VIRTUAL_ENV -nu immich uv sync --extra openvino --no-dev --active --link-mode copy -n -p python3.12 --managed-python + patchelf --clear-execstack "${VIRTUAL_ENV}/lib/python3.12/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.cpython-312-x86_64-linux-gnu.so" msg_ok "Installed HW-accelerated machine-learning" else msg_info "Installing machine-learning" - $STD sudo --preserve-env=VIRTUAL_ENV -nu immich uv sync --extra cpu --active -n -p python3.11 --managed-python + $STD sudo --preserve-env=VIRTUAL_ENV -nu immich uv sync --extra cpu --no-dev --active --link-mode copy -n -p python3.11 --managed-python msg_ok "Installed machine-learning" fi cd "$SRC_DIR" @@ -384,7 +385,7 @@ msg_ok "Installed GeoNames data" mkdir -p /var/log/immich touch /var/log/immich/{web.log,ml.log} -msg_ok "Installed ${APPLICATION}" +msg_ok "Installed Immich" msg_info "Modifying user, creating env file, scripts & services" usermod -aG video,render immich @@ -393,11 +394,12 @@ cat <"${INSTALL_DIR}"/.env TZ=$(cat /etc/timezone) IMMICH_VERSION=release NODE_ENV=production +IMMICH_ALLOW_SETUP=true DB_HOSTNAME=127.0.0.1 -DB_USERNAME=${DB_USER} -DB_PASSWORD=${DB_PASS} -DB_DATABASE_NAME=${DB_NAME} +DB_USERNAME=${PG_DB_USER} +DB_PASSWORD=${PG_DB_PASS} +DB_DATABASE_NAME=${PG_DB_NAME} DB_VECTOR_EXTENSION=vectorchord REDIS_HOSTNAME=127.0.0.1