nvidia
Recipe card from the charly-distros plugin (Images — the deployable catalog).
nvidia
Section titled “nvidia”The NVIDIA GPU driver-runtime layer — the distro package arms for the driver user-space
(nvidia-utils / nvidia-driver), the CDI generation wiring (nvidia-ctk, the Vulkan ICD) and the
nvidia-smi a host needs.
A pod never composes this layer. A pod takes the driver from the host through CDI: the pod base
is podcdi.pod-cdi, which composes layer-cdi (the contract) and, today, the CUDA toolkit. This
layer is for a HOST image (nvidia-cdi-host) and a passthrough VM, where the guest
bakes the driver because no CDI injection exists there. The Fedora GPU boxes were dropped
(opencharly/opencharly#1287); the GPU workload images are CachyOS-only.
Layer Properties
Section titled “Layer Properties”| Property | Value |
|---|---|
| Package arms | Fedora rpm (nvidia-driver* repo) + Arch pac (nvidia-utils) |
| Consumers | nvidia-cdi-host (host image), a passthrough VM box |
| Never composed by | a pod — it uses podcdi.pod-cdi and CDI injection |
Layer Content
Section titled “Layer Content”nvidia— GPU runtime: the driver user-space packages,nvidia-container-toolkit(CDI), the Vulkan ICD, VA-APIcuda— CUDA toolkit, cuDNN, onnxruntime, ffmpeg-libs (composed beside it, not required by it)
Where it is composed
Section titled “Where it is composed”nvidia-cdi-host(opencharly/layer-nvidia) — a HOST image: the containerd handler, the durablenvidia-cdi-refreshunits and the rootless spec link (see CDI host layer below).- a passthrough VM box — bakes the driver because the guest has no CDI injection.
Key Candies
Section titled “Key Candies”/charly-distros:nvidia— NVIDIA GPU runtime (CDI generation via nvidia-ctk; host driver libs injected at run time)/charly-distros:cuda— CUDA toolkit and GPU development libraries
CDI host layer
Section titled “CDI host layer”nvidia-cdi-host extends nvidia for a host (not a workload image). It composes
the nvidia candy and then:
- runs
nvidia-ctk runtime configure --runtime=containerdwith an explicit, layer-owned--drop-in-config /etc/containerd/conf.d/99-nvidia.toml, without--enable-cdi(CDI is always on in containerd 2.x and the key is ignored with a warning) and without--set-as-default(the handler is selected per pod or container). The command also records the drop-in directory inconfig.toml’simports, and the layer fails closed if the drop-in or the import does not land; - restarts containerd after writing the drop-in. containerd reads its config and
drop-ins at startup, so a written drop-in is not a live handler; measured on the
GPU host, a drop-in naming
nvidiasat beside a running daemon that listed onlycrun; - enables and starts the toolkit’s
nvidia-cdi-refresh.pathand.service, so/var/run/cdi/nvidia.yamlis regenerated at boot, on nvidia module load and when the toolkit changes, and exists on a fresh host before the checks run. A one-shotnvidia-ctk cdi generate --output=/etc/cdi/nvidia.yamlis a snapshot: the driver version appears ~115x in the generated spec and goes stale on the first driver upgrade; - links the refreshed spec into the rootless client’s config dir. The rootless spec
dirs are
$XDG_CONFIG_HOME/cdiand$XDG_RUNTIME_DIR/cdi, never/etc/cdi; the link helper resolves the user’sXDG_CONFIG_HOMEfrom their login environment (default~/.config) and targetsnvidia.yaml -> /var/run/cdi/nvidia.yaml. For a user that does not exist at build time, auser-tmpfiles.drule creates the client-default%h/.config/cdi/nvidia.yamlat first login — systemd-tmpfiles has noXDG_CONFIG_HOMEspecifier, which is the rule’s documented limitation.
Verify the device, never an exit code: nvidia-ctk cdi list exits 0 on an
invalid spec (Found 0 CDI devices), and two same-priority specs leave the device
dropped. The layer’s checks require crictl info to serve the nvidia handler,
nvidia-ctk cdi list to report nvidia.com/gpu=all, and
--device nvidia.com/gpu=all to run nvidia-smi -L. The
check-nvidia-cdi-host bed carries the same sequence rootful and rootless, and
skips visibly with prereq-gpu-skipped on a host without the GPU. Its
data-producing steps were executed individually against scratch daemons on an
RTX 4080 SUPER host; a full charly check run on a disposable GPU host is
the remaining gate and is not yet recorded.
Arch/omarchy only: a Fedora arm is additive and is not claimed until its own disposable bed exists.
Related
Section titled “Related”/charly-distros:cdi— the pod contract; a pod composespodcdi.pod-cdi, never this layer./charly-distros:cuda— the toolkit, composed beside this layer by a VM/host that compiles./charly-ollama:ollama— LLM inference server/charly-comfyui:comfyui— image generation UI
Related Boxes
Section titled “Related Boxes”/charly-distros:fedora— parent base (no GPU)/charly-distros:cachyos— the CachyOS image family; its GPU base ispodcdi.pod-cdi(a pod), not anvidiabox/charly-coder:charly-arch— Arch Linux charly toolchain with nvidia (shared candies)
Verification
Section titled “Verification”After charly box build:
charly shell nvidia -c "nvidia-smi"— GPU infocharly shell nvidia -c "nvidia-ctk --version"— CDI toolkitcharly shell nvidia -c "nvcc --version"— CUDA compiler
When to Use This Skill
Section titled “When to Use This Skill”MUST be invoked when the task involves the nvidia box, GPU base images, CUDA in containers, or CDI device configuration. Invoke this skill BEFORE reading source code or launching Explore agents.
Related
Section titled “Related”/charly-image:image— image family umbrella (candy:image entries — those carryingbase:/from:— incharly.yml, build/validate/inspect/list)/charly-build:build— the embedded build vocabulary (distros, builders, init-systems)

