-
Notifications
You must be signed in to change notification settings - Fork 269
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
Improve hostRequirements, Features support for dev containers that use GPUs #82
Comments
I generally like this - however I'd really like to be able to have a devcontainer that supports GPUs when available but doesn't require them. For my specific use case, we have some libraries that can use GPUs, but also fall back to CPUs if they are not available. Currently the developers need to manually add/remove the My sugestion would be to extended this proposal with something like: "hostRequirements": {
"gpu": {
"optional": true
}
} (I appreciate that mixing 'requirements' and |
This flag isn't present in podman, and isn't part of the CDI spec, btw. You're supposed to set things up differently in podman (although you can also install a global hook). |
Wrote down what we agreed on for the implementation here: #82 |
Commit: 9dba5385c7aefebe3756ed413da7fedf1868a71c
Dev containers can run on machines with GPUs and access them directly on Linux or through WSL on Windows. However, currently there is no direct support for a GPUs in the spec.
To enable GPU support, I'd propose we enhance the "hostRequirements" property to allow specifying GPU information. If this information is present, we then automatically enable GPU support (e.g., via --gpus all).
I'd propose we support a form that simply adds a requirement for any GPU, with the option to specify more requirements for further validation. Here's a proposed format:
Just enabling/requiring any GPU
Specifying cores and memory:
and with type
To allow Dev Container Features (#61) to require a GPU (e.g., in an NVIDIA CUDA feature), I'd propose we also allow
hostRequirements
to be specified indevcontainer-features.json
.The text was updated successfully, but these errors were encountered: