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

[nvidia-container-toolkit] Allow customizing nvidia-container-runtime.toml #399

Open
nevivurn opened this issue May 31, 2024 · 2 comments
Open

Comments

@nevivurn
Copy link

It would be useful if it were possible to customize nvidia-container-runtime.toml without having to build new build assets.

We are using nvidia GPUs in our cluster, and we want to prevent users from accessing all GPUs on a system by setting NVIDIA_VISIBLE_DEVICES=all, instead requiring proper resource requests & quotas.

nvidia does provide a way to do this, as documented here by setting

accept-nvidia-visible-devices-envvar-when-unprivileged = false
accept-nvidia-visible-devices-as-volume-mounts = true

in nvidia-container-runtime.toml.

Currently, there does not seem to be a way to do this without building the extensions and boot assets.

@frezbo
Copy link
Member

frezbo commented Jun 6, 2024

If this has no user visible change, we could even make this the default.

@nevivurn
Copy link
Author

nevivurn commented Jun 6, 2024

This does have user-visible change. If the user runs a container that sets NVIDIA_VISIBLE_DEVICES=all and does not specify requests or limits, previously they would have access to every GPU on the node, while with the above config they would see none.

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

2 participants