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
- GPU Operator installs toolkit DaemonSet with
toolkit.installDir set to a non-default path (e.g. /opt/nvidia/toolkit/).
- gVisor/runsc is configured as an alternative runtime with
nvproxy: true.
- 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
Describe the bug
When
toolkit.installDiris set to a non-standard location (required for OSes with a read-only/usr),nvidia-container-cliis installed to a path like/opt/nvidia/toolkit/nvidia-container-cli. This path is not on the system or containerd$PATH.gVisor's
runscusesexec.LookPath("nvidia-container-cli")to locate the binary (source — seenvProxyPreGoferHostSetup), which fails with:This works with runc because
nvidia-container-runtimeresolves 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
toolkit.installDirset to a non-default path (e.g./opt/nvidia/toolkit/).nvproxy: true.runtimeClassName: gvisorfails to start becauserunsccallsexec.LookPath("nvidia-container-cli")during container creation, and the binary is not on the inherited PATH.Expected behavior
nvidia-container-clishould be discoverable via standard PATH lookup after toolkit installation, regardless ofinstallDir. Note that the motivation for using a non-defaultinstallDiris that/usris read-only on these OSes, so symlinking into/usr/local/binis not a viable solution.Workaround
Extend containerd's PATH via a systemd drop-in:
Followed by
systemctl daemon-reload && systemctl restart containerd.Environment:
nvidia-container-toolkitversion: v1.17.4 (also reproduced with v1.19.1)/usr)