mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-24 21:47:26 +00:00
Refactor VAAPI and NVIDIA passthrough setup for LXC
Consolidates and simplifies VAAPI and NVIDIA passthrough logic by introducing unified GPU app detection and moving userland package installation into dedicated *_inside_setup functions. Updates build.func to use new function names and ensures setup is only performed for relevant apps and non-Alpine containers. Improves maintainability and clarity of passthrough.func.
This commit is contained in:
@@ -2201,8 +2201,8 @@ EOF
|
||||
|
||||
source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/passthrough.func)
|
||||
usb_handle_passthrough "$CTID" "$CT_TYPE"
|
||||
vaapi_handle_passthrough "$CTID" "$CT_TYPE" "$APP"
|
||||
nvidia_handle_passthrough "$CTID" "$CT_TYPE" "$APP"
|
||||
vaapi_select_and_apply "$CTID" "$CT_TYPE"
|
||||
nvidia_passthrough_to_lxc "$CTID" "$CT_TYPE"
|
||||
|
||||
# TUN device passthrough
|
||||
if [ "$ENABLE_TUN" == "yes" ]; then
|
||||
@@ -2276,9 +2276,10 @@ EOF
|
||||
fi
|
||||
|
||||
msg_info "Customizing LXC Container"
|
||||
# Container erfolgreich gestartet
|
||||
vaapi_inside_setup "$CTID" "$CT_TYPE"
|
||||
nvidia_inside_setup "$CTID" "$CT_TYPE"
|
||||
if [ "$var_os" != "alpine" ]; then
|
||||
vaapi_inside_setup "$CTID" "$CT_TYPE" "$APP"
|
||||
nvidia_inside_setup "$CTID" "$CT_TYPE" "$APP"
|
||||
fi
|
||||
if [ "$var_os" == "alpine" ]; then
|
||||
sleep 3
|
||||
pct exec "$CTID" -- /bin/sh -c 'cat <<EOF >/etc/apk/repositories
|
||||
|
||||
Reference in New Issue
Block a user