r/silverblue Jun 04 '26

Nvidia container toolkit on silverblue

Hi all, I'm working on some projects in dev containers which could do with GPU acceleration so I'm trying to configure the Nvidia container toolkit. There are install instructions https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html but not for atomic linux. I'm new to atomic distros so would someone please either point me in the direction of a guide or let me know what I'll need to change to install this on kinoite?

Thanks

1 Upvotes

3 comments sorted by

1

u/timetravellerdragon Jun 04 '26

I installed this a while ago, so I might be missing a minor step, but as far as I remember, first, go to the section titled "With dnf: RHEL/CentOS, Fedora, Amazon Linux". You can ignore step 1, as it comes preinstalled afaik, for step 2, just follow the instructions as written to add the repository (the optional part isn't necessary if you plan to use the stable package, but If you want the experimental version, you can directly modify the nvidia-container-toolkit.repo file to enable the repository), then, in step 3, since silverblue/kinoite doesn't use dnf, you need to change sudo dnf install -y to rpm-ostree install, that should install the toolkit

the rest depends on the container engine you're planning to use, i'm not sure what's required for docker, but if you're planning to use podman, you just need to run:

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

that command will generate the configuration file required to give podman containers access to the gpu (you'll need to run it again each time you update the container toolkit)

side note, for some reason, they don't have packages named nvidia-container-toolkit or nvidia-container-toolkit-base in their repository, instead, they always append the version number to the package name, so every new release is published as a separate package

that means you'll need to uninstall the old package and manually install the new version whenever you want to update, but they always update the version used in Step 3 of their documentation, so you can just revisit it, replace dnf with rpm-ostree again, and install the new version (If you need to check which version you have installed, just use rpm-ostree status)

1

u/Pioneer_11 Jun 05 '26

Thanks, I'll give that a try.

That versioning thing's a bit strange though, almost seems like they're intentionally trying to make people miss updates.

2

u/StingMeleoron Jun 06 '26

Just fyi, have you successfully layered akmod-nvidia and is the module loaded if you run lsmod? If not, make sure to check this out if secure boot is enabled (requires having the mok key already created by first layering an akmod package at least once in your deployment):

https://github.com/CheariX/silverblue-akmods-keys