Commit graph

20 commits

Author SHA1 Message Date
Rafael Fernández López d287c86c08 nixos/nvidia-container-toolkit: fix tests 2025-07-18 03:53:46 +00:00
Rafael Fernández López 117bbae49c
nvidia-container-toolkit: reintroduce nvidia runtime wrappers
This allows users to keep using `docker run --gpus`. Despite CDI is
the recommended way to expose GPU's to containers nowadays, allow
users to keep using the old `--gpus` method.
2025-07-16 22:38:11 +02:00
Jared Baur 73b4810ff3
nixos/nvidia-container-toolkit: add extraArgs option 2025-07-09 18:38:56 -07:00
Rafael Fernández López 1948ad4bb5 nixos/nvidia-container-toolkit: allow to provide CSV files 2025-05-28 15:57:21 +02:00
Yang, Bo dd30fd1285 nvidia-container-toolkit: add suppressNvidiaDriverAssertion option 2025-04-15 23:27:51 +02:00
Rafael Fernández López 71f11f66a0
nvidia-container-toolkit: 1.15.0-rc.3 -> 1.17.5 2025-04-14 10:53:23 +02:00
Silvan Mosberger 374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Rafael Fernández López 3f119f80a5
nvidia-container-toolkit: assert nvidia driver is present
Also, do not add the `nvidia` driver to `videoDrivers` automatically;
assert it is present (or the datacenter one) instead.
2024-10-22 00:05:26 +02:00
Rafael Fernández López 0d3c3735e5
nvidia-container-toolkit: add "nvidia" to services.xserver.videoDrivers
This will ensure that all requirements are met when the
nvidia-container-toolkit is enabled in order to generate the CDI specs
for the machine.

Also, if `config.virtualisation.docker.rootless.enable` is true,
automatically enable the CDI feature if the Docker version > 25 for
the rootless installation.
2024-09-24 17:10:07 +02:00
Someone 4faf4ca9af
nvidia-container-toolkit: only mount existing paths in the host (#319772) 2024-08-27 11:18:18 +00:00
Someone 2d7db58c2f
Merge pull request #313225 from ereslibre/nvidia-consistent-casing
docs: fix Nvidia casing to be consistent across different places
2024-08-22 16:51:41 +00:00
Rafael Fernández López d665ca4fb2 nvidia-container-toolkit: add initial set of tests to check closures 2024-08-19 19:40:28 +02:00
Rafael Fernández López 2b883410d4 nvidia-container-toolkit: only mount existing paths in the host 2024-08-19 19:34:34 +02:00
Jonathan Zielinski 42e7fd46e7 nixos/nvidia-container-toolkit: add device-name-strategy option
Containerd will fail to inject CDI devices if you've been using the
uuid naming strategy rather than the default one.
2024-07-30 15:25:48 +00:00
Rafael Fernández López 79c79671a7 hardware/nvidia-container-toolkit: mount nvidia-driver/share 2024-05-27 23:44:32 +02:00
Rafael Fernández López 7749696f61 docs: fix Nvidia casing to be consistent across different places 2024-05-20 22:17:31 +02:00
Rafael Fernández López eb59699fbb hardware/nvidia-container-toolkit: enable CDI on virtualisation.docker.daemon.settings 2024-04-24 18:08:04 +02:00
Rafael Fernández López de3ce5ffa7 nixos/nvidia-container-toolkit: add mount-nvidia-executables and mount-nvidia-docker-1-directories options
- `mount-nvidia-binaries`: this option allows users to avoid mounting
nvidia binaries on the container.

- `mount-nvidia-docker-1-directories`: this option allows users to
avoid mounting `/usr/local/nvidia/lib{,64}` on containers.
2024-04-23 12:31:45 +02:00
Rafael Fernández López 471ff2c33c nixos/nvidia-container-toolkit: rename from virtualisation.containers.cdi.dynamic.nvidia.enable
Add the NixOS option `hardware.nvidia-container-toolkit-cdi-generator.enable`.

This enables the ability to expose GPU's in containers for container
runtimes that support the Container Device Interface (CDI)

Remove `cdi.static` and `cdi.dynamic.nvidia.enable` attributes.
2024-04-23 12:26:00 +02:00