Open janetat opened 1 week ago
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.
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
How to modify
/etc/nvidia-container-runtime/config.toml
innvidia-contianer-toolkit-daemonset-xxx
installed by helm? I needaccept-nvidia-visible-devices-envvar-when-unprivileged = true