Skip to content PULSAR
Docs Install
DocsThemesReleasesBlog Install Source on GitHub
Docs GPU containers

GPU containers

Run CUDA and local models in a container. On the NVIDIA image, podman gives a container the GPU with --device nvidia.com/gpu=all.

Give a container the GPU

If this prints your card, it works:

For example, ollama:

The driver and libcuda come from the image, and the container brings its own CUDA runtime. The same thing as a quadlet:

NVIDIA image only. On the standard image, pass /dev/dri for Vulkan.

What makes it work

Podman uses CDI specs, which map nvidia.com/gpu=all to device nodes and driver libraries. Two units set this up at each boot.

  • nvidia-cdi-refresh.service writes the spec for the running driver to /var/run/cdi/nvidia.yaml. That folder is a tmpfs, emptied at every shutdown.
  • pulsar-gpu-containers.service turns on the SELinux boolean container_use_xserver_devices each boot. Without it, nvidia-smi fails with “Failed to initialize NVML: Insufficient Permissions”. The boolean lets a container use a GPU device node it was given, and a container started without --device has no /dev/nvidia0 to open.
A spec from nvidia-ctk cdi generate in /etc/cdi survives driver updates and goes stale.

What doctor reports

doctor saysDo this
no CDI spec, so containers cannot be given the GPUsudo systemctl restart nvidia-cdi-refresh.service, then read journalctl -b -u nvidia-cdi-refresh.service
stale CDI spec for driver …If the spec it names is in /etc/cdi, delete it. A hand-written spec there goes stale at every driver update. If it is in /var/run/cdi, run sudo systemctl restart nvidia-cdi-refresh.service, which writes that folder.
CDI spec matches …, but SELinux blocks containers from the GPUThe unit that turns the boolean on didn’t run. Look at systemctl status pulsar-gpu-containers.service.

If no NVIDIA module is loaded at all, see the nvidia check in Troubleshooting.

A model for your agents

pulsar agent model on runs llama.cpp’s server as a rootless quadlet (CUDA, Vulkan or CPU) on 127.0.0.1 behind a key, for opencode. See Coding agents.

Written with help from AI and reviewed by a person before publishing. If you find a mistake, open an issue on GitHub.

PULSAR

Your lighthouse in the sky.

Site

Source and data

Arclight

Theme

Dark only Light only

Recolors the whole site, like pulsar theme set does your desktop.

Light and dark

Light or dark only

Saved in this browser Reset to the Pulsar theme