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

Please update Nvidia Container Toolkit usage #1654

Open
SeongGino opened this issue Jan 9, 2025 · 0 comments
Open

Please update Nvidia Container Toolkit usage #1654

SeongGino opened this issue Jan 9, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@SeongGino
Copy link

In current available Distrobox documentation, regarding using the Nvidia CTK, it says:

Using nvidia-container-toolkit

Alternatively from the --nvidia flag, you can use NVidia’s own nvidia-container-toolkit. After following the official guide to set nvidia-ctk up you can use it from distrobox doing:

distrobox create --name example-nvidia-toolkit --additional-flags "--runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all -e NVIDIA_DRIVER_CAPABILITIES=all" --image nvidia/cuda

The problem here though is two-fold:

  1. nvidia/cuda will result in a short-name lookup error, as it actually needs to be prefixed with docker.io/nvidia... for it to link to anything.
  2. After downloading the container files, podman(?) errors out with:
Creating 'Ubuntu-NVCTK' using image docker.io/nvidia/cuda:12.6.3-runtime-ubuntu22.04    Error: default OCI runtime "nvidia" not found: invalid argument
 [ ERR ] failed to create container.

...despite following all the preceeding steps to the best of my ability. At least on Arch, this is supposed to be automated by simply installing nvidia-container-toolkit and letting it run its pacman hook to auto generate a file in /etc/cdi/nvidia.yaml, and the podman Arch Wiki page has no other steps that's implied to be necessary. The basic podman test does report back my GPU, so it clearly is functional to some degree.

I'm only saying this because currently, using distrobox with podman cannot run with the --nvidia container option due to #1589, which leaves the toolkit as the only option to integrate NV support in podman distroboxes, but the docs are sorely lacking right now and I'm pulling my hair trying to get it to function properly.

Desktop (please complete the following information):

  • Are you using podman, docker or lilipod? podman
  • Which version or podman, docker or lilipod? 5.3.1
  • Which version of distrobox? 1.8.0
  • Which host distribution? Arch
  • How did you install distrobox? Arch extra repo
@SeongGino SeongGino added the bug Something isn't working label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant