NVIDIA GPU runtime layer for OpenCharly images.
The nvidia candy prepares an image to use an NVIDIA GPU. It installs
nvidia-container-toolkit — the nvidia-ctk CLI that generates CDI device
specs — together with the per-distro driver libraries, exports
LD_LIBRARY_PATH=/usr/lib64 so the driver libraries resolve, and prepares
/etc/vulkan/icd.d to hold the NVIDIA Vulkan ICD symlinks. It is the GPU
runtime base that GPU-accelerated boxes compose; the CUDA toolchain is a
separate cuda layer.
| Property | Value |
|---|---|
| Layer / candy | nvidia |
| Package | nvidia-container-toolkit (all distros) |
| Binary | /usr/bin/nvidia-ctk |
| Environment | LD_LIBRARY_PATH=/usr/lib64 |
| Directory | /etc/vulkan/icd.d (NVIDIA Vulkan ICD / layer symlinks) |
| Service / port | none |
Per-distro driver packages:
arch/omarchy—nvidia-utilsfedora—libva-nvidia-driver(from the negativo17fedora-multimediarepo) plus NVIDIA's ownnvidia-container-toolkitrepo, with package signature verification enforced (gpgcheck=1, overriding NVIDIA's shippedgpgcheck=0).
Compose the layer by pinning this repo in a box's candy: list:
my-host-image: # a HOST image, or a passthrough VM's guest
candy:
base: fedora-nonfree # or cachyos.cachyos for the Arch driver layout
candy:
- '@github.com/opencharly/layer-nvidia:v2026.329.1714'Once the image is built and the GPU is attached by the runtime:
nvidia-smi # GPU information
nvidia-ctk --version # CDI toolkitThe layer bakes every artifact (package, nvidia-ctk binary, exported path,
Vulkan ICD directory) into the image, so it is verifiable without a physical
GPU. A pod never composes this layer: a pod takes the driver from the host through CDI on the
podcdi.pod-cdi base. A host image pairs it with cuda when it compiles, and a passthrough VM
composes both. The Fedora GPU boxes (python-ml, jupyter, ollama, comfyui) were dropped
(opencharly/opencharly#1287).
nvidia-cdi-host is the host-side companion: it composes nvidia and configures
a host's containerd for CDI. It runs nvidia-ctk runtime configure --runtime=containerd with a layer-owned drop-in
(/etc/containerd/conf.d/99-nvidia.toml), without --enable-cdi (ignored on
containerd 2.x) and without --set-as-default, and fails closed if the handler
or the config imports entry does not land. It then restarts containerd —
containerd reads its config at startup, so a written drop-in is not a live
handler. It enables and starts the toolkit's nvidia-cdi-refresh.path /
.service so /var/run/cdi/nvidia.yaml is regenerated rather than snapshotted
and exists on a fresh host, and links that refreshed file into the rootless
client's spec dir: the user's $XDG_CONFIG_HOME/cdi (default ~/.config/cdi),
resolved by the layer's link helper. A user-tmpfiles.d rule covers a user that
does not exist at build time, at the client default %h/.config (systemd-tmpfiles
has no XDG_CONFIG_HOME specifier).
The checks gate on the device, not an exit code: nvidia-ctk cdi list exits 0 on
an invalid spec, so the layer asserts that crictl info serves the nvidia
handler, the list reports nvidia.com/gpu=all, and a
--device nvidia.com/gpu=all container runs nvidia-smi -L. The
check-nvidia-cdi-host bed carries that sequence rootful and rootless; on a host
without the GPU it skips visibly with prereq-gpu-skipped. 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: the Fedora arm is additive and is not claimed until its own disposable bed exists.
charly.yml— the candy manifest: the multi-distro package arms, theLD_LIBRARY_PATHenvironment, the Vulkan ICD wiringplan:, theplan:checks, the CDI host layer and its GPU bed, and the embeddedskill:entity.CHANGELOG/— per-CalVer release notes..github/workflows/tag-on-merge.yml— CalVer tag +CHANGELOG/on merge.README.md— this user overview.
- Owning skill:
/charly-distros:nvidia - CUDA toolkit:
/charly-distros:cuda - Derived GPU boxes:
/charly-languages:python-ml,/charly-ollama:ollama,/charly-comfyui:comfyui - Arch/CachyOS GPU base sibling:
cachyos.nvidiainopencharly/distro-cachyos opencharly/charly— the charly CLI and image builderopencharly/opencharly— the umbrella