You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve hostRequirements, Features support for dev containers that use GPUs #82
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
"hostRequirements": {
"gpu": true
Specifying cores and memory:
"hostRequirements": {
"gpu": {
"cores": 2"memory":"4gb"// Same value format as memory for the machine
}
}
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 in devcontainer-features.json.
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 -gpus all.
My sugestion would be to extended this proposal with something like:
Activity
chris-major-improbable commentedon Aug 30, 2022
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
-gpus all.My sugestion would be to extended this proposal with something like:
(I appreciate that mixing 'requirements' and
optionalelements seems a bit counter intuitive, however I can't think of a better option).Clockwork-Muse commentedon Sep 9, 2022
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).
Add GPU host requirement properties (devcontainers/spec#82)
GPU host requirement proposal (#82)
chrmarti commentedon Nov 28, 2022
Wrote down what we agreed on for the implementation here: #82
Add GPU host requirement properties (devcontainers/spec#82)
vscode: Add GPU host requirement properties (devcontainers/spec#82)
Add GPU host requirement properties (#82)
GPU host requirement proposal (#82)
Add GPU host requirement properties (#82)