55# License: MIT
66# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
77# Execute within the Proxmox shell
8- # bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc /hw-acceleration.sh)"
8+ # bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve /hw-acceleration.sh)"
99
1010set -e
1111function header_info {
7676fi
7777header_info
7878
79- cat << EOF >>/etc/pve/lxc/${privileged_container} .conf
79+ cat << EOF >>/etc/pve/lxc/" ${privileged_container} " .conf
8080lxc.cgroup2.devices.allow: c 226:0 rwm
8181lxc.cgroup2.devices.allow: c 226:128 rwm
8282lxc.cgroup2.devices.allow: c 29:0 rwm
@@ -89,7 +89,7 @@ read -r -p "Do you need the intel-media-va-driver-non-free driver (Debian 12 onl
8989if [[ ${prompt,,} =~ ^(y| yes)$ ]]; then
9090 header_info
9191 msg_info " Installing Hardware Acceleration (non-free)"
92- pct exec ${privileged_container} -- bash -c " cat <<EOF >/etc/apt/sources.list.d/non-free.list
92+ pct exec " ${privileged_container} " -- bash -c " cat <<EOF >/etc/apt/sources.list.d/non-free.list
9393
9494deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
9595deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
@@ -101,12 +101,12 @@ deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free
101101deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
102102EOF"
103103
104- pct exec ${privileged_container} -- bash -c " silent() { \"\$ @\" >/dev/null 2>&1; } && $STD apt-get update && $STD apt-get install -y intel-media-va-driver-non-free ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && $STD adduser \$ (id -u -n) video && $STD adduser \$ (id -u -n) render"
104+ pct exec " ${privileged_container} " -- bash -c " silent() { \"\$ @\" >/dev/null 2>&1; } && $STD apt-get update && $STD apt-get install -y intel-media-va-driver-non-free ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && $STD adduser \$ (id -u -n) video && $STD adduser \$ (id -u -n) render"
105105 msg_ok " Installed Hardware Acceleration (non-free)"
106106else
107107 header_info
108108 msg_info " Installing Hardware Acceleration"
109- pct exec ${privileged_container} -- bash -c " silent() { \"\$ @\" >/dev/null 2>&1; } && $STD apt-get install -y va-driver-all ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && chgrp video /dev/dri && chmod 755 /dev/dri && $STD adduser \$ (id -u -n) video && $STD adduser \$ (id -u -n) render"
109+ pct exec " ${privileged_container} " -- bash -c " silent() { \"\$ @\" >/dev/null 2>&1; } && $STD apt-get install -y va-driver-all ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && chgrp video /dev/dri && chmod 755 /dev/dri && $STD adduser \$ (id -u -n) video && $STD adduser \$ (id -u -n) render"
110110 msg_ok " Installed Hardware Acceleration"
111111fi
112112sleep 1
0 commit comments