!eWOErHSaiddIbsUNsJ:nixos.org

NixOS CUDA

288 Members
CUDA packages maintenance and support in nixpkgs | https://github.com/orgs/NixOS/projects/27/ | https://nixos.org/manual/nixpkgs/unstable/#cuda56 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
18 Nov 2025
@glepage:matrix.orgGaétan LepageWay better for me.16:14:49
19 Nov 2025
@eymeric:onyx.ovhEymeric joined the room.12:59:28
@jfly:matrix.orgJeremy Fleischman (jfly) joined the room.18:13:28
@jfly:matrix.orgJeremy Fleischman (jfly)

i'm confused about the compatibility story between whatever libcuda.so file i have in /run/opengl-driver and my nvidia kernel module. i've read through <nixos/modules/hardware/video/nvidia.nix> and i see that hardware.graphics.extraPackages basically gets set to pkgs.linuxKernel.packages.linux_6_12.nvidiaPackages.stable.out (or whatever kernel i have selected)

how much drift (if any) is allowed here?

18:18:44
@jfly:matrix.orgJeremy Fleischman (jfly)to avoid an XY problem: what i'm actually doing is experimenting with defining systemd nixos containers that run cuda software internally, and i'm not sure how to get the right libcuda.so's in those containers so they play nicely with the host's kernel18:21:46
@jfly:matrix.orgJeremy Fleischman (jfly)if the answer is "just keep them perfectly in sync with the host kernel's version", that's OK. just trying to flesh out my mental model18:22:27
@connorbaker:matrix.orgconnor (burnt/out) (UTC-8) libcuda.so is provided by the NVIDIA CUDA driver, which for our purposes is generally part of the NVIDIA driver for your GPU.
Do the systemd NixOS containers provide their own copy of NVIDIA's driver? If not, they wouldn't have libcuda.so available.
The CDI stuff providing GPU access in containers provides /run/opengl-driver/lib (among other things): https://github.com/NixOS/nixpkgs/blob/6c634f7efae329841baeed19cdb6a8c2fc801ba1/nixos/modules/services/hardware/nvidia-container-toolkit/default.nix#L234-L237
General information about forward-backward compat is in NVIDIA's docs here: https://docs.nvidia.com/deploy/cuda-compatibility/#
18:31:45
@sporeray:matrix.orgRobbie Buxton
In reply to @jfly:matrix.org
to avoid an XY problem: what i'm actually doing is experimenting with defining systemd nixos containers that run cuda software internally, and i'm not sure how to get the right libcuda.so's in those containers so they play nicely with the host's kernel
If you run the host systems cuda kernel drivers ahead of the user mode drivers it’s normally fine provided it’s not a major version change (I.e 13 vs 12)
18:35:26

Show newer messages


Back to Room ListRoom Version: 9