fix: hardware accel and naming issues

This commit is contained in:
Kyle Kroboth 2025-03-08 00:16:14 -05:00
parent 0a2722ee95
commit 9ff05c6cc9
2 changed files with 34 additions and 8 deletions

View File

@ -22,6 +22,30 @@ $STD apt-get install -y \
mc mc
msg_ok "Installed Dependencies" 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 <<EOF >/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" 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 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 $STD dpkg -i packages-microsoft-prod.deb
@ -40,20 +64,22 @@ msg_ok "Setup ${APPLICATION}"
# Creating Service # Creating Service
msg_info "Creating Service" msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/${APPLICATION}.service cat <<EOF >/etc/systemd/system/fileflows.service
[Unit] [Unit]
Description=${APPLICATION} Service Description=${APPLICATION} Service
After=network.target After=network.target
[Service] [Service]
WorkingDirectory=/opt/wastebin WorkingDirectory=/opt/fileflows
ExecStart=dotnet FileFlows.Server.dll ExecStart=/opt/fileflows/fileflows-systemd-entrypoint.sh
SyslogIdentifier=FileFlows
Restart=always Restart=always
RestartSec=10
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF
systemctl enable -q --now ${APPLICATION}.service systemctl enable -q --now fileflows.service
msg_ok "Created Service" msg_ok "Created Service"
motd_ssh motd_ssh

View File

@ -1135,7 +1135,7 @@ EOF
fi fi
if [ "$CT_TYPE" == "0" ]; then 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 <<EOF >>$LXC_CONFIG cat <<EOF >>$LXC_CONFIG
# VAAPI hardware transcoding # VAAPI hardware transcoding
lxc.cgroup2.devices.allow: c 226:0 rwm 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 EOF
fi fi
else 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/renderD128" ]]; then
if [[ -e "/dev/dri/card0" ]]; then if [[ -e "/dev/dri/card0" ]]; then
cat <<EOF >>$LXC_CONFIG cat <<EOF >>$LXC_CONFIG
@ -1201,7 +1201,7 @@ description() {
<img src='https://img.shields.io/badge/&#x2615;-Buy us a coffee-blue' alt='spend Coffee' /> <img src='https://img.shields.io/badge/&#x2615;-Buy us a coffee-blue' alt='spend Coffee' />
</a> </a>
</p> </p>
<span style='margin: 0 10px;'> <span style='margin: 0 10px;'>
<i class="fa fa-github fa-fw" style="color: #f5f5f5;"></i> <i class="fa fa-github fa-fw" style="color: #f5f5f5;"></i>
<a href='https://github.com/community-scripts/ProxmoxVE' target='_blank' rel='noopener noreferrer' style='text-decoration: none; color: #00617f;'>GitHub</a> <a href='https://github.com/community-scripts/ProxmoxVE' target='_blank' rel='noopener noreferrer' style='text-decoration: none; color: #00617f;'>GitHub</a>
@ -1250,7 +1250,7 @@ exit_script() {
#200 exit codes indicate error in create_lxc.sh #200 exit codes indicate error in create_lxc.sh
#100 exit codes indicate error in install.func #100 exit codes indicate error in install.func
if [ $exit_code -ne 0 ]; then if [ $exit_code -ne 0 ]; then
case $exit_code in case $exit_code in
100) post_update_to_api "failed" "100: Unexpected error in create_lxc.sh" ;; 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" ;; 101) post_update_to_api "failed" "101: No network connection detected in create_lxc.sh" ;;