Skip to content
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

Add nvidia-ctk with nvidia-container-toolkit #317199

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rutrum
Copy link

@rutrum rutrum commented Jun 4, 2024

Description of changes

I think this is a bug fix. The nixos option hardware.nvidia-container-toolkit.mount-nvidia-executables states that nvidia-ctk would be added, but it is not. I believe this adds it.

Sorry this is my second attempt at a pull request because I was unsure how to change the upstream branch and squash commits. Thanks for your patience.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@rutrum
Copy link
Author

rutrum commented Jun 4, 2024

Quick question: if this is seen as a bug, will this be backported to 24.05 or is it just added to nixpkgs unstable?

@ereslibre
Copy link
Member

ereslibre commented Jun 14, 2024

Hello @rutrum,

Thank you for your contribution. What is the main use case of having the nvidia-ctk mounted within the container? As far as I am aware, it's useful on the host side to configure CDI to properly set up the containerized environment. I weighted adding it inside the container, but I failed to see a reason to do so.

The patch you provided effectively makes the nvidia-ctk available within the container with the change I proposed to your diff. What I wonder is what is the use case for doing so.

Thanks!

@@ -94,6 +94,8 @@
containerPath = "/usr/bin/nvidia-debugdump"; }
{ hostPath = lib.getExe' nvidia-driver "nvidia-powerd";
containerPath = "/usr/bin/nvidia-powerd"; }
{ hostPath = lib.getExe' nvidia-driver "nvidia-ctk";
Copy link
Member

@ereslibre ereslibre Jun 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{ hostPath = lib.getExe' nvidia-driver "nvidia-ctk";
{ hostPath = lib.getExe' pkgs.nvidia-container-toolkit "nvidia-ctk";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants