0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +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" ];
};
};
};

View file

@ -30,26 +30,6 @@ lib.makeScope newScope (
configTemplate = self.dockerConfig;
};
podmanConfig = {
disable-require = true;
#swarm-resource = "DOCKER_RESOURCE_GPU";
nvidia-container-cli = {
#root = "/run/nvidia/driver";
#path = "/usr/bin/nvidia-container-cli";
environment = [ ];
#debug = "/var/log/nvidia-container-runtime-hook.log";
ldcache = "/tmp/ld.so.cache";
load-kmods = true;
no-cgroups = true;
#user = "root:video";
ldconfig = "@@glibcbin@/bin/ldconfig";
};
};
nvidia-container-toolkit-podman = self.nvidia-container-toolkit-docker.override {
configTemplate = self.podmanConfig;
};
nvidia-docker = symlinkJoin {
name = "nvidia-docker";
paths = [
@ -60,13 +40,5 @@ lib.makeScope newScope (
};
nvidia-docker-unwrapped =
self.callPackage ./nvidia-docker.nix { };
nvidia-podman = symlinkJoin {
name = "nvidia-podman";
paths = [
self.nvidia-container-toolkit-podman
];
inherit (self.nvidia-container-toolkit-podman) meta;
};
}
)

View file

@ -1051,6 +1051,7 @@ mapAliases ({
noto-fonts-extra = noto-fonts; # Added 2023-04-08
NSPlist = nsplist; # Added 2024-01-05
nushellFull = lib.warn "`nushellFull` has has been replaced by `nushell` as it's features no longer exist" nushell; # Added 2024-05-30
nvidia-podman = throw "podman should use the Container Device Interface (CDI) instead. See https://web.archive.org/web/20240729183805/https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#configuring-podman"; # Added 2024-08-02
nvidia-thrust = throw "nvidia-thrust has been removed because the project was deprecated; use cudaPackages.cuda_cccl";
nvtop = lib.warn "nvtop has been renamed to nvtopPackages.full" nvtopPackages.full; # Added 2024-02-25
nvtop-amd = lib.warn "nvtop-amd has been renamed to nvtopPackages.amd" nvtopPackages.amd; # Added 2024-02-25

View file

@ -22975,7 +22975,6 @@ with pkgs;
{ };
inherit (nvidiaCtkPackages)
nvidia-docker
nvidia-podman
;
nvidia-vaapi-driver = lib.hiPrio (callPackage ../development/libraries/nvidia-vaapi-driver { });