Closed DictXiong closed 2 weeks ago
The nvidia-container-toolkit-cdi-generator service will ask docker to mount the binary nvidia-powerd which is not provided by the Nvidia driver v470.
nvidia-container-toolkit-cdi-generator
nvidia-powerd
https://github.com/NixOS/nixpkgs/blob/47b604b07d1e8146d5398b42d3306fdebd343986/nixos/modules/services/hardware/nvidia-container-toolkit/default.nix#L95
Using NixOS 24.05 with nixpkgs 47b604b0.
47b604b0
Steps to reproduce the behavior:
nixpkgs.config.nvidia.acceptLicense = true; hardware.nvidia = { package = config.boot.kernelPackages.nvidiaPackages.legacy_470; modesetting.enable = false; powerManagement.enable = true; powerManagement.finegrained = false; open = false; nvidiaSettings = true; }; hardware.opengl = { enable = true; driSupport = true; driSupport32Bit = true; }; hardware.nvidia-container-toolkit.enable = true; services.xserver.videoDrivers = [ "nvidia" ];
nvidia-powerd should not be mounted when the binary is missing.
@ereslibre
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m" - system: `"x86_64-linux"` - host os: `Linux 6.6.32, NixOS, 24.05 (Uakari), 24.05.20240611.47b604b` - multi-user?: `yes` - sandbox: `yes` - version: `nix-env (Nix) 2.18.2` - nixpkgs: `/nix/store/0vpk9v6rj551q42ym4h9qrdx9xxxhcsg-source`
Edited: a workaround
systemd.services.nvidia-container-toolkit-cdi-generator = { path = [ pkgs.jq pkgs.moreutils ]; postStart = '' jq '."containerEdits"."mounts" |= map(select(."containerPath" != "/usr/bin/nvidia-powerd"))' /run/cdi/nvidia-container-toolkit.json | sponge /run/cdi/nvidia-container-toolkit.json ''; };
Add a :+1: reaction to issues you find important.
Thank you for the report @DictXiong. You can also set hardware.nvidia-container-toolkit.mount-nvidia-executables = false; in the meantime. I'll open a PR as soon as possible.
hardware.nvidia-container-toolkit.mount-nvidia-executables = false;
Describe the bug
The
nvidia-container-toolkit-cdi-generator
service will ask docker to mount the binarynvidia-powerd
which is not provided by the Nvidia driver v470.https://github.com/NixOS/nixpkgs/blob/47b604b07d1e8146d5398b42d3306fdebd343986/nixos/modules/services/hardware/nvidia-container-toolkit/default.nix#L95
Using NixOS 24.05 with nixpkgs
47b604b0
.Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
nvidia-powerd
should not be mounted when the binary is missing.Screenshots
Notify maintainers
@ereslibre
Metadata
Edited: a workaround
Add a :+1: reaction to issues you find important.