Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tdarr: NVIDIA GPU Support
Summary
Adds NVIDIA GPU hardware acceleration support to Tdarr LXC containers.
Important
This PR prioritizes the native
var_gpuandsetup_hwaccelfor Intel/AMD iGPU support. This PR adds NVIDIA support for/dev/nvidia*devices in addition to the standard/dev/driinterface.Note
This PR modifies two files:
ct/tdarr.shandinstall/tdarr-install.sh.NVIDIA Requirements
/dev/dri(render nodes)var_gpu+setup_hwaccel/dev/nvidia*(proprietary)NVIDIA GPU passthrough to LXC containers requires:
/dev/nvidia*devices are not part of/dev/driWithout this, applications attempting to use the GPU (e.g., handbrake, ffmpeg) will fail with a
Driver/library version mismatcherror when attempting to initialize the NVML or CUDA interface.Core Libraries & Transcoding
The following libraries are matched to the host version to enable hardware acceleration:
libcuda1libnvcuvid1libnvidia-encode1libnvidia-ml1Service Management
The PR implements robust systemd service management to ensure reliability and ease of use:
tdarr-server.service: Manages the main Tdarr Server. IncludesExecStartPreto automatically run theTdarr_Updaterbefore every start.tdarr-node.service: Manages the Tdarr Node. Configured withRequires=tdarr-server.serviceto ensure the correct startup sequence.tdarr-nodeortdarr-serverservices can be enabled or disabled per container.Changes
ct/tdarr.sh(Host-Side)apt-mark holdon host to prevent breaking updatesbuild.funcnativesinstall/tdarr-install.sh(Container-Side)/proc/driver/nvidia/version(shared with host)libcuda1etc. pinned to host versionnvidia-smifor status monitoringtdarr-serverandtdarr-nodeservicesintel-media-va-driver-non-freefor multi-GPU supportArchitecture
Testing
aptcorrectly prioritizes pinned NVIDIA repoFiles Changed
ct/tdarr.sh— NVIDIA detection and device passthroughinstall/tdarr-install.sh— Userspace package installation