Immich: handle custom library dependency updates; other fixes (#5896)

- Adds libaom-dev to the installer; checks for it and installs during
update
- Refactor immich.sh to simplify custom library recompilations into
functions
- Move installation of packages from Testing repo before Postgresql
install to avoid DB collation issue
This commit is contained in:
Chris
2025-07-11 02:35:45 -04:00
committed by GitHub
parent 6fcca2bfdb
commit 8595d48cec
2 changed files with 162 additions and 150 deletions

View File

@ -66,6 +66,7 @@ $STD apt-get install --no-install-recommends -y \
mesa-vulkan-drivers \
ocl-icd-libopencl1 \
tini \
libaom-dev \
zlib1g
$STD apt-get install -y \
libgdk-pixbuf-2.0-dev librsvg2-dev libtool
@ -110,6 +111,23 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
msg_ok "Installed OpenVINO dependencies"
fi
msg_info "Installing Packages from Testing Repo"
export APT_LISTCHANGES_FRONTEND=none
export DEBIAN_FRONTEND=noninteractive
$STD apt-get install -t testing --no-install-recommends -y \
libio-compress-brotli-perl \
libwebp7 \
libwebpdemux2 \
libwebpmux3 \
libhwy1t64 \
libdav1d-dev \
libhwy-dev \
libwebp-dev
if [[ -f ~/.openvino ]]; then
$STD apt-get install -t testing -y patchelf
fi
msg_ok "Packages from Testing Repo Installed"
NODE_VERSION="22" setup_nodejs
PG_VERSION="16" PG_MODULES="pgvector" setup_postgresql
@ -136,27 +154,6 @@ $STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;"
} >>~/"$APPLICATION".creds
msg_ok "Set up Postgresql Database"
msg_info "Installing Packages from Testing Repo"
export APT_LISTCHANGES_FRONTEND=none
export DEBIAN_FRONTEND=noninteractive
$STD apt-get install -t testing --no-install-recommends -y \
libio-compress-brotli-perl \
libwebp7 \
libwebpdemux2 \
libwebpmux3 \
libhwy1t64 \
libdav1d-dev \
libhwy-dev \
libwebp-dev
if [[ -f ~/.openvino ]]; then
$STD apt-get install -t testing -y patchelf
fi
msg_ok "Packages from Testing Repo Installed"
# Fix default DB collation issue after libc update
$STD sudo -u postgres psql -c "ALTER DATABASE postgres REFRESH COLLATION VERSION;"
$STD sudo -u postgres psql -c "ALTER DATABASE $DB_NAME REFRESH COLLATION VERSION;"
msg_info "Compiling Custom Photo-processing Library (extreme patience)"
LD_LIBRARY_PATH=/usr/local/lib
export LD_RUN_PATH=/usr/local/lib
@ -218,7 +215,7 @@ $STD cmake --preset=release-noplugins \
-DWITH_LIBSHARPYUV=ON \
-DWITH_LIBDE265=ON \
-DWITH_AOM_DECODER=OFF \
-DWITH_AOM_ENCODER=OFF \
-DWITH_AOM_ENCODER=ON \
-DWITH_X265=OFF \
-DWITH_EXAMPLES=OFF \
..