Update hw-acceleration.sh

This commit is contained in:
CanbiZ 2025-03-27 14:09:50 +01:00
parent 46d1e2e309
commit 3d63800e65

View File

@ -52,21 +52,25 @@ function msg() {
}
function select_hw_features() {
local opts=(
"usb" "USB Passthrough" OFF
"intel" "Intel VAAPI GPU" OFF
"nvidia" "NVIDIA GPU" OFF
"amd" "AMD GPU (ROCm)" OFF
)
SELECTED_FEATURES=$(whiptail --title "Hardware Options" --checklist \
"Select hardware features to passthrough:" 20 50 10 \
"${opts[@]}" 3>&1 1>&2 2>&3 | tr -d '"')
local opts
opts=$(
whiptail --title "🔧 Hardware Integration" --checklist \
"\nSelect hardware features to passthrough:\n" 20 60 8 \
"usb" "🖧 USB Passthrough " OFF \
"intel" "🟦 Intel VAAPI GPU " OFF \
"nvidia" "🟨 NVIDIA GPU " OFF \
"amd" "🟥 AMD GPU (ROCm) " OFF \
3>&1 1>&2 2>&3
) || exit 1
SELECTED_FEATURES=$(echo "$opts" | tr -d '"')
if [[ -z "$SELECTED_FEATURES" ]]; then
msg warn "No hardware passthrough options selected"
msg warn "No passthrough options selected"
exit 1
fi
}
function select_lxc_targets() {
local list; local opts=()
if ! list=$(pct list | awk 'NR>1 {print $1 "|" $2}' | xargs -n1); then