This commit is contained in:
CanbiZ 2025-03-31 15:01:06 +02:00
parent 79f92db110
commit 96602f913a
2 changed files with 11 additions and 3 deletions

View File

@ -55,14 +55,14 @@ function passthrough_intel_to_lxc() {
function install_intel_tools_in_ct() {
local ctid="$1"
local install_nonfree="$2"
if is_alpine_ct "$ctid"; then
msg warn "Skipping Intel tool install for Alpine CT $ctid"
return 0
fi
read -rp "Install non-free intel-media-va-driver (Debian only)? [y/N]: " confirm
if [[ "${confirm,,}" =~ ^(y|yes)$ ]]; then
if [[ "$install_nonfree" == "yes" ]]; then
msg info "Enabling non-free sources in $ctid..."
pct exec "$ctid" -- bash -c "tee /etc/apt/sources.list.d/non-free.list >/dev/null" <<'EOF'
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware

View File

@ -103,6 +103,14 @@ function main() {
local updated_cts=()
local intel_nonfree="no"
if [[ " ${SELECTED_FEATURES[*]} " =~ " intel " ]]; then
read -rp "Install non-free intel-media-va-driver (Debian only)? [y/N]: " confirm
if [[ "${confirm,,}" =~ ^(y|yes)$ ]]; then
intel_nonfree="yes"
fi
fi
for ctid in $SELECTED_CTIDS; do
local conf="/etc/pve/lxc/${ctid}.conf"
local updated=0
@ -115,7 +123,7 @@ function main() {
;;
intel)
msg info "Intel passthrough setup for CT $ctid"
passthrough_intel_to_lxc "$ctid" && install_intel_tools_in_ct "$ctid" && updated=1
passthrough_intel_to_lxc "$ctid" && install_intel_tools_in_ct "$ctid" "$intel_nonfree" && updated=1
;;
nvidia)
msg info "Validating NVIDIA setup..."