New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
podman: add nvidia runtime support #108547
Conversation
Please either undo the formatting changes or move them into a separate commit. cc @NixOS/podman |
Sorry, I meant format then apply your changes. Add things and then reformatting them is hard to follow. |
Alright, I will redo. |
@zowoq In general is it possible to test basic GPU functionality on the nix build farm? If so, I'll add a test here. |
No, I don't think we're able to test this. Now that the formatting changes are split out from the other changes I've noticed that you're probably using Rather than ask you to redo this again I've reverted most of the formatting changes, squashed commits as needed and updated the commit messages to follow our style. |
eb75ead
to
ab0ad8c
Compare
Alright I will try to get my editor set up to use the right tool to auto format |
I am using |
It is. Especially nixpkgs is not aligned with it. Maybe this change in future. |
For me with diff --git a/nixos/modules/virtualisation/podman.nix b/nixos/modules/virtualisation/podman.nix
index f554aeffb45..e108d9d8c5f 100644
--- a/nixos/modules/virtualisation/podman.nix
+++ b/nixos/modules/virtualisation/podman.nix
@@ -7,10 +7,11 @@ let
podmanPackage = (pkgs.podman.override { inherit (cfg) extraPackages; });
# Provides a fake "docker" binary mapping to podman
- dockerCompat = pkgs.runCommandNoCC "${podmanPackage.pname}-docker-compat-${podmanPackage.version}" {
- outputs = [ "out" "man" ];
- inherit (podmanPackage) meta;
- } ''
+ dockerCompat = pkgs.runCommandNoCC "${podmanPackage.pname}-docker-compat-${podmanPackage.version}"
+ {
+ outputs = [ "out" "man" ];
+ inherit (podmanPackage) meta;
+ } ''
mkdir -p $out/bin
ln -s ${podmanPackage}/bin/podman $out/bin/docker
|
I am going to rebase this and make sure this works with #108607 |
@zowoq I ended up having to add |
message = "Option dockerCompat conflicts with docker"; | ||
} | ||
{ | ||
assertion = cfg.enableNvidia -> !config.virtualisation.docker.enableNvidia; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I plan to remove this restriction in a follow up PR.
Motivation for this change
This change adds an
enableNvidia
option to thepodman
module that enables the nvidia runtime.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)