November 20, 20241 yr I just completed a new intel i-514500 build and added an Nvidia GPU for some light gaming. How do I select what GPU to pass to what docker container? Do I replace "/dev/dri" with "/dev/dri/renderD128" and "/dev/dri/card0"? card0/renderD128 - iGPU card1/renderD129 - nvidia GPU I would like to pass the iGPU to Plex for quick sync, and use the NVIDA GPU for gaming in VM or other Docker containers.
November 21, 20241 yr Community Expert Need more info... Advance toggle Docker extra options. Usualy the docker needs some sort of driver installed to use... To assign specific GPUs to Docker containers and VMs on Unraid, you can utilize the Docker container runtime options and adjust the configuration for your setup. Here's how you can do it: Step 1: Identify GPU Devices From your setup: Intel iGPU: /dev/dri/card0 and /dev/dri/renderD128. NVIDIA GPU: /dev/dri/card1 and /dev/dri/renderD129 ^-Should be Double Check... Step 2: Configure Docker Containers 1. Plex Container with Intel iGPU To enable Intel Quick Sync (iGPU) in Plex: Edit the Docker container settings for Plex. Add the following paths to pass the iGPU: Device mapping #either path share it /dev/dri:/dev/dri or extra option: --device /dev/dri Example Plex/I aume plex...: Tips for Docker Extra Parameters Intel iGPU: Use /dev/dri for Plex. NVIDIA GPU: Use the NVIDIA runtime with specific device mappings (--device=/dev/dri/renderD129). Ensure the Plex container uses Intel's iGPU by setting the proper environment variable or configuration within Plex: Under Transcoder settings in Plex, select Use hardware acceleration when available. Save and restart the container. Other Containers with NVIDIA GPU To use the NVIDIA GPU for other Docker containers: Install the NVIDIA Driver Plugin in Unraid: Go to Apps > Search for "NVIDIA Driver" > Install. Add the NVIDIA runtime to your containers: *There will be notes in teh docker THIS IS WHY IT IMPORTANT TO READ THE OVERVIEW!!! --runtime=nvidia #or depnds on docker... --device=/dev/dri/renderD129:/dev/dri/renderD128 Add environment variables for NVIDIA: Key: NVIDIA_VISIBLE_DEVICES Value: all (or specify the GPU UUID if you want to restrict access to a specific GPU). Key: NVIDIA_DRIVER_CAPABILITIES Value: compute,video,utility Not need but could use VFIP bind and VM... Configure VM with NVIDIA GPU To pass the NVIDIA GPU to a VM: Go to VMs in Unraid. Edit or create the VM and assign the NVIDIA GPU: Select the NVIDIA GPU and corresponding Audio device under the Graphics Card and Sound Card dropdowns. Enable GPU passthrough:If the GPU is bound to the host (Unraid), you'll need to bind it to VFIO for passthrough. Go to Tools > System Devices. Locate the NVIDIA GPU and check the box for binding to VFIO. Reboot the server. Start the VM, and ensure the NVIDIA GPU is recognized.
March 7, 20251 yr On 11/21/2024 at 6:33 AM, bmartino1 said: NVIDIA GPU: Use the NVIDIA runtime with specific device mappings (--device=/dev/dri/renderD129). On 11/21/2024 at 6:33 AM, bmartino1 said: Other Containers with NVIDIA GPU To use the NVIDIA GPU for other Docker containers: Install the NVIDIA Driver Plugin in Unraid: Go to Apps > Search for "NVIDIA Driver" > Install. Add the NVIDIA runtime to your containers: *There will be notes in teh docker THIS IS WHY IT IMPORTANT TO READ THE OVERVIEW!!! --runtime=nvidia #or depnds on docker... --device=/dev/dri/renderD129:/dev/dri/renderD128 It is not necessary to pass through the DRI from a Nvidia GPU since the proprietary driver even don't use that device and is a bit more complicated. The proprietary driver uses the device /dev/nvidia but please be aware that you also don't have to pass that device through because this is all handled by the nvidia-container-runtime (which is part of the Nvidia Driver plugin), so to speak it is enough to add --runtime=nvidia & NVIDIA_VISIBLE_DEVICES & NVIDIA_DRIVER_CAPABILITIES to your Docker container if you have a Nvidia GPU and want to use it in a Docker container. Please avoid recommending to pass through /dev/dri for a Nvidia GPU.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.