0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

nvidia-podman: remove nvidia wrapper

Since version 4.1.0, podman has support for CDI, and is the
recommended way to expose GPU's for containers for podman.

More information: https://web.archive.org/web/20240729183805/https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#configuring-podman
This commit is contained in:
Rafael Fernández López 2024-07-31 09:56:09 +02:00
parent f7b4d57421
commit 058e8f5ef1
No known key found for this signature in database
GPG key ID: A07C55EEE4CCE570
4 changed files with 2 additions and 35 deletions

View file

@ -170,7 +170,7 @@ in
lib.mkIf cfg.enable {
warnings = lib.optionals cfg.enableNvidia [
''
You have set virtualisation.podman.enableNvidia. This option is deprecated, please set virtualisation.containers.cdi.dynamic.nvidia.enable instead.
You have set virtualisation.podman.enableNvidia. This option is deprecated, please set hardware.nvidia-container-toolkit.enable instead.
''
];
@ -189,11 +189,6 @@ in
enable = true; # Enable common /etc/containers configuration
containersConf.settings = {
network.network_backend = "netavark";
} // lib.optionalAttrs cfg.enableNvidia {
engine = {
conmon_env_vars = [ "PATH=${lib.makeBinPath [ pkgs.nvidia-podman ]}" ];
runtimes.nvidia = [ "${pkgs.nvidia-podman}/bin/nvidia-container-runtime" ];
};
};
};