Immich: make changes to automatically enable QuickSync (#5560)

- In previous versions of the script, transcoding was enabled only if
you chose to enable OpenVINO
- Recently that was decoupled, but a couple of things were overlooked
- Now, even if you elect to not enable OpenVINO, the necessary
permission and group changes will be made to the immich user (or the
root user if choosing a privileged LXC) regardless.
This commit is contained in:
Chris 2025-06-30 09:21:36 -04:00 committed by GitHub
parent f83bfd1598
commit 5313f00edb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -84,6 +84,13 @@ $STD apt-get update
$STD apt-get install -y jellyfin-ffmpeg7 $STD apt-get install -y jellyfin-ffmpeg7
ln -s /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/bin/ffmpeg ln -s /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/bin/ffmpeg
ln -s /usr/lib/jellyfin-ffmpeg/ffprobe /usr/bin/ffprobe ln -s /usr/lib/jellyfin-ffmpeg/ffprobe /usr/bin/ffprobe
if [[ "$CTTYPE" == "0" ]]; then
chgrp video /dev/dri
chmod 755 /dev/dri
chmod 660 /dev/dri/*
$STD adduser "$(id -u -n)" video
$STD adduser "$(id -u -n)" render
fi
msg_ok "Dependencies Installed" msg_ok "Dependencies Installed"
read -r -p "Install OpenVINO dependencies for Intel HW-accelerated machine-learning? y/N " prompt read -r -p "Install OpenVINO dependencies for Intel HW-accelerated machine-learning? y/N " prompt
@ -100,13 +107,6 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
$STD popd $STD popd
rm -rf "$tmp_dir" rm -rf "$tmp_dir"
dpkg -l | grep "intel-opencl-icd" | awk '{print $3}' >~/.intel_version dpkg -l | grep "intel-opencl-icd" | awk '{print $3}' >~/.intel_version
if [[ "$CTTYPE" == "0" ]]; then
chgrp video /dev/dri
chmod 755 /dev/dri
chmod 660 /dev/dri/*
$STD adduser "$(id -u -n)" video
$STD adduser "$(id -u -n)" render
fi
msg_ok "Installed OpenVINO dependencies" msg_ok "Installed OpenVINO dependencies"
fi fi
@ -360,9 +360,8 @@ msg_ok "Installed ${APPLICATION}"
msg_info "Creating user, env file, scripts & services" msg_info "Creating user, env file, scripts & services"
$STD useradd -U -s /usr/sbin/nologin -r -M -d "$INSTALL_DIR" immich $STD useradd -U -s /usr/sbin/nologin -r -M -d "$INSTALL_DIR" immich
if [[ -f ~/.openvino ]]; then
usermod -aG video,render immich usermod -aG video,render immich
fi
cat <<EOF >"${INSTALL_DIR}"/.env cat <<EOF >"${INSTALL_DIR}"/.env
TZ=$(cat /etc/timezone) TZ=$(cat /etc/timezone)
IMMICH_VERSION=release IMMICH_VERSION=release