Skip to content

NVIDIA setup

Install the full NVIDIA graphics driver, version 610 or newer, for your Linux distribution and check nvidia-smi lists your GPU. Then install the NVIDIA Container Toolkit using NVIDIA’s package instructions. Choose the instructions for your distribution; Ubuntu/Debian and Fedora use different packages. On Unraid, use the Unraid steps below instead.

Give Docker its NVIDIA runtime, then restart the daemon. Restarting Docker can interrupt running containers.

Terminal window
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker

The restart command above is for systemd hosts; use your host’s service manager otherwise. Check docker info lists nvidia under Runtimes. If Docker uses SELinux (docker info lists it under Security Options), apply the SELinux steps. Then return to Docker installation.

Podman uses a CDI device description to make the GPU available to containers. After installing the driver and toolkit:

Terminal window
sudo nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml
nvidia-ctk cdi list

The list should include your NVIDIA GPU. Regenerate the file after driver or GPU changes. Newer toolkit versions can also refresh CDI automatically; see NVIDIA’s CDI guide. If SELinux is enabled, apply the SELinux steps. Then return to Podman installation, including its required systemd socket, restart service and runtime directory.

NVIDIA Vulkan in a container normally needs /dev/nvidia-modeset. Nothing creates that node until something opens it, and a CDI description only lists device nodes that exist when it is generated. A host whose containers are not given the node can fail app launches while the rest of the host looks healthy.

Create the node, then (on a host that uses a CDI description) generate it:

Terminal window
sudo nvidia-modprobe -m
ls /dev/nvidia-modeset
sudo nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml

Then restart the Quasar agent container. It worked when the application GPU probe check for your GPU is green. The check fails when a container is not given /dev/nvidia-modeset and Vulkan does not start; it does not detect other Vulkan faults.

Both rootless engines use CDI for Quasar’s NVIDIA sessions. Generate and check the CDI description with the commands under Podman rootful, as root. Rootless Docker must support and expose CDI; Quasar’s readiness checks report a missing NVIDIA CDI device rather than falling back to the rootful runtime path.

Follow rootless host preparation for the quasar account, device permissions, systemd user session and engine setup. Generating CDI alone does not grant that account access to the GPU devices. Apply the SELinux steps below when applicable. Rootless support remains experimental.

For Podman, or Docker with SELinux enabled, permit access to NVIDIA devices. These existing Quasar policy steps keep SELinux enforcing:

Terminal window
sudo setsebool -P container_use_xserver_devices on
echo '(allow container_engine_t xserver_misc_device_t (chr_file (getattr ioctl lock map open read write append)))' > quasar-nested-gpu.cil
sudo semodule -i quasar-nested-gpu.cil
  1. Install the NVIDIA driver plugin through Unraid. Use its plugin-managed driver and container runtime rather than the Linux package commands above.
  2. In the Unraid host shell, check the driver:
Terminal window
nvidia-smi

Your GPU should be listed.

  1. Check the container runtime:
Terminal window
docker info

Runtimes should include nvidia.

  1. Unraid writes the CDI description at boot, before anything creates the display device node. After each boot, run the steps in The display device node, using the plugin’s own CDI generator in place of the bare nvidia-ctk command (it also applies a gbm symlink patch). Run both from a boot-time script, such as the User Scripts plugin at array start, then restart the Quasar agent container.
  2. Continue with Unraid installation for persistent storage and deployment.