Compare commits

..

No commits in common. "07a3a8aa79d532b3b48055b148ac000bf22124d5" and "b6b1e8db4afe55ba91606f477dde2526964c7eb1" have entirely different histories.

1 changed files with 5 additions and 7 deletions

View File

@ -4,8 +4,6 @@
# Author: tteck (tteckster) # Author: tteck (tteckster)
# License: MIT # License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE # https://github.com/tteck/Proxmox/raw/main/LICENSE
# Execute within the Proxmox shell
# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/hw-acceleration.sh)"
set -e set -e
function header_info { function header_info {
@ -41,9 +39,9 @@ function msg_ok() {
echo -e "${BFR} ${CM} ${GN}${msg}${CL}" echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
} }
if ! pveversion | grep -Eq "pve-manager/(8\.[1-3])"; then if ! pveversion | grep -Eq "pve-manager/(8\.[0-9])"; then
msg_error "This version of Proxmox Virtual Environment is not supported" msg_error "This version of Proxmox Virtual Environment is not supported"
echo -e "Requires PVE Version 8.1 or higher" echo -e "Requires PVE Version 8.0 or higher"
echo -e "Exiting..." echo -e "Exiting..."
sleep 2 sleep 2
exit exit
@ -85,11 +83,11 @@ lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
EOF EOF
read -r -p "Do you need the intel-media-va-driver-non-free driver (Debian 12 only)? <y/N> " prompt read -r -p "Do you need the intel-media-va-driver-non-free driver (Sources change)? <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
header_info header_info
msg_info "Installing Hardware Acceleration (non-free)" msg_info "Installing Hardware Acceleration (non-free)"
pct exec ${privileged_container} -- bash -c "cat <<EOF >/etc/apt/sources.list.d/non-free.list pct exec ${privileged_container} -- bash -c "cat <<EOF >/etc/apt/sources.list
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
@ -101,7 +99,7 @@ deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free
deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
EOF" EOF"
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" 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 && chgrp video /dev/dri && chmod 755 /dev/dri && $STD adduser \$(id -u -n) video && $STD adduser \$(id -u -n) render"
msg_ok "Installed Hardware Acceleration (non-free)" msg_ok "Installed Hardware Acceleration (non-free)"
else else
header_info header_info