From 9ff05c6cc9f805eb7bddff82f8eddb12ca272bdb Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Sat, 8 Mar 2025 00:16:14 -0500 Subject: [PATCH] fix: hardware accel and naming issues --- install/fileflows-install.sh | 34 ++++++++++++++++++++++++++++++---- misc/build.func | 8 ++++---- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index f5f0a04..cefe333 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -22,6 +22,30 @@ $STD apt-get install -y \ mc msg_ok "Installed Dependencies" +msg_info "Installing FFmpeg (Patience)" +wget -q https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2016.8.1_all.deb +$STD dpkg -i deb-multimedia-keyring_2016.8.1_all.deb +cat </etc/apt/sources.list.d/backports.list +deb https://www.deb-multimedia.org bookworm main non-free +deb https://www.deb-multimedia.org bookworm-backports main +EOF +$STD apt update +DEBIAN_FRONTEND=noninteractive $STD apt-get install -t bookworm-backports ffmpeg -y +rm -rf /etc/apt/sources.list.d/backports.list deb-multimedia-keyring_2016.8.1_all.deb +$STD apt update +msg_ok "Installed FFmpeg" + +msg_info "Setting Up Hardware Acceleration" +$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools} +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 "Set Up Hardware Acceleration" + msg_info "Installing ASP.NET Core Runtime" wget -q https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb $STD dpkg -i packages-microsoft-prod.deb @@ -40,20 +64,22 @@ msg_ok "Setup ${APPLICATION}" # Creating Service msg_info "Creating Service" -cat </etc/systemd/system/${APPLICATION}.service +cat </etc/systemd/system/fileflows.service [Unit] Description=${APPLICATION} Service After=network.target [Service] -WorkingDirectory=/opt/wastebin -ExecStart=dotnet FileFlows.Server.dll +WorkingDirectory=/opt/fileflows +ExecStart=/opt/fileflows/fileflows-systemd-entrypoint.sh +SyslogIdentifier=FileFlows Restart=always +RestartSec=10 [Install] WantedBy=multi-user.target EOF -systemctl enable -q --now ${APPLICATION}.service +systemctl enable -q --now fileflows.service msg_ok "Created Service" motd_ssh diff --git a/misc/build.func b/misc/build.func index bd55da0..6b82441 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1135,7 +1135,7 @@ EOF fi if [ "$CT_TYPE" == "0" ]; then - if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" ]]; then + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then cat <>$LXC_CONFIG # VAAPI hardware transcoding lxc.cgroup2.devices.allow: c 226:0 rwm @@ -1147,7 +1147,7 @@ lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,creat EOF fi else - if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" ]]; then + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then if [[ -e "/dev/dri/renderD128" ]]; then if [[ -e "/dev/dri/card0" ]]; then cat <>$LXC_CONFIG @@ -1201,7 +1201,7 @@ description() { spend Coffee

- + GitHub @@ -1250,7 +1250,7 @@ exit_script() { #200 exit codes indicate error in create_lxc.sh #100 exit codes indicate error in install.func - if [ $exit_code -ne 0 ]; then + if [ $exit_code -ne 0 ]; then case $exit_code in 100) post_update_to_api "failed" "100: Unexpected error in create_lxc.sh" ;; 101) post_update_to_api "failed" "101: No network connection detected in create_lxc.sh" ;;