NVIDIA / NVIDIA/nvidia-container-toolkit

nvidia-container-cli not discoverable by gVisor/runsc when toolkit.installDir is non-default

Open
#1,880 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

lifecycle/stale
Dominant language
Go
Stars
4.6k
Forks
592
Avg merge
1d 33m
Merged PRs (30d)
61

Description

Describe the bug

When toolkit.installDir is set to a non-standard location (required for OSes with a read-only /usr), nvidia-container-cli is installed to a path like /opt/nvidia/toolkit/nvidia-container-cli. This path is not on the system or containerd $PATH.

gVisor's runsc uses exec.LookPath("nvidia-container-cli") to locate the binary (source — see nvProxyPreGoferHostSetup), which fails with:

failed to locate nvidia-container-cli in PATH:
exec: "nvidia-container-cli": executable file not found in $PATH

This works with runc because nvidia-container-runtime resolves the binary path from its own config TOML. gVisor intentionally does not parse that config (source) and relies on standard PATH lookup instead.

To Reproduce

  1. GPU Operator installs toolkit DaemonSet with toolkit.installDir set to a non-default path (e.g. /opt/nvidia/toolkit/).
  2. gVisor/runsc is configured as an alternative runtime with nvproxy: true.
  3. A GPU pod with runtimeClassName: gvisor fails to start because runsc calls exec.LookPath("nvidia-container-cli") during container creation, and the binary is not on the inherited PATH.

Expected behavior

nvidia-container-cli should be discoverable via standard PATH lookup after toolkit installation, regardless of installDir. Note that the motivation for using a non-default installDir is that /usr is read-only on these OSes, so symlinking into /usr/local/bin is not a viable solution.

Workaround

Extend containerd's PATH via a systemd drop-in:

# /etc/systemd/system/containerd.service.d/nvidia-toolkit.conf
[Service]
Environment=PATH=/opt/nvidia/toolkit:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Followed by systemctl daemon-reload && systemctl restart containerd.

Environment:

  • nvidia-container-toolkit version: v1.17.4 (also reproduced with v1.19.1)
  • NVIDIA Driver Version: 590.48.01 (open kernel modules)
  • Host OS: Garden Linux 2150.4 (read-only /usr)
  • Container Runtime Version: containerd 2.0.x
  • CPU Architecture: x86_64
  • GPU Model(s): T4
  • Kubernetes: 1.31
  • NVIDIA GPU Operator version: 24.9.2
  • gVisor/runsc version: release-20260511.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the toolkit.installDir handling and the installation entry point that places nvidia-container-cli; compare the non-default-path behavior with runsc's nvProxyPreGoferHostSetup and exec.LookPath call. Done means a non-default installation is discoverable by standard PATH lookup for gVisor without writing to the read-only /usr, and the GPU pod startup scenario succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes, linux
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.