It seems nvidia + docker was broken by the upgrade to 24.05.
What are the proper configs for nvidia container runtime to work properly under docker and 24.05?
{ config, lib, pkgs, ... }:
let
in
{
environment.systemPackages = with pkgs; [
nvidia-docker
docker_25
nvidia-container-toolkit
];
systemd.enableUnifiedCgroupHierarchy = false;
hardware.nvidia-container-toolkit.enable = true;
virtualisation = {
containers = {
enable = true;
#cdi.dynamic.nvidia.enable = true;
};
docker = {
enable = true;
#enableNvidia = true;
# CDI is feature-gated and only available from Docker 25 and onwards
#package = pkgs.docker_26;
package = pkgs.docker_25;
#setSocketVariable = true;
daemon.settings = {
features.cdi = true;
default-runtime = "nvidia";
runtimes.nvidia.path = "${pkgs.nvidia-docker}/bin/nvidia-container-runtime";
exec-opts = ["native.cgroupdriver=cgroupfs"];
};
#storageDriver = "zfs";
};
#oci-containers.backend = "docker";
};
}
nvidia-container-runtime run --rm ubuntu nvidia-smi
warning: $XDG_CONFIG_HOME=/home/thoth/.config
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: /nix/store/va74ykggqzmamwh2aj39fxlwzf8csw6s-nvidia-docker/bin/nvidia-container-runtime did not terminate successfully: exit status 125: unknown.
Of note, I have tried docker_26 docker_25 docker_24 and docker none of those seem to work.