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

How to modify /etc/nvidia-container-runtime/config.toml? #1027

Open
janetat opened this issue Oct 9, 2024 · 2 comments
Open

How to modify /etc/nvidia-container-runtime/config.toml? #1027

janetat opened this issue Oct 9, 2024 · 2 comments

Comments

@janetat
Copy link

janetat commented Oct 9, 2024

How to modify /etc/nvidia-container-runtime/config.toml in nvidia-contianer-toolkit-daemonset-xxx installed by helm?
I need accept-nvidia-visible-devices-envvar-when-unprivileged = true

@cdesiniotis
Copy link
Contributor

You can do this by configuring the following environment variable in ClusterPolicy:

toolkit:
  env:
  - name: ACCEPT_NVIDIA_VISIBLE_DEVICES_ENVVAR_WHEN_UNPRIVILEGED
    value: "true"

Note that "true" is the default value for this field in the config file.

@astranero
Copy link

Small example of doing it using helm directly

microk8s helm install nvidia/gpu-operator --generate-name -n gpu-operator-resources --version 24.6.1 $HELM_OPTIONS \
  --set toolkit.env[4].name=ACCEPT_NVIDIA_VISIBLE_DEVICES_ENVVAR_WHEN_UNPRIVILEGED \
  --set-string toolkit.env[4].value=true \
  --set toolkit.env[5].name=ACCEPT_NVIDIA_VISIBLE_DEVICES_AS_VOLUME_MOUNTS \
  --set-string toolkit.env[5].value=false \
  --set devicePlugin.env[0].name=DEVICE_LIST_STRATEGY \
  --set devicePlugin.env[0].value="envvar" \
  --set driver.enabled=false

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

No branches or pull requests

3 participants