diff options
author | Samruddhi Khandale <skhandale@microsoft.com> | 2023-07-11 21:16:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-11 21:16:23 +0300 |
commit | 07693965d74d289e9a4035907d2414d9683e0773 (patch) | |
tree | 22ac1869e3281ea0622f79f9ad354440196a6aba | |
parent | c4ffeebdacc3c7c020ee7c286aae88959aa91671 (diff) |
Nvidia-cuda: Update notes regarding gpu enablement (#608)
* Nvidia-cuda: Update notes regarding gpu enablement
* use GPU hostRequirements instead
* nit
* use gpu:optional instead
-rw-r--r-- | src/nvidia-cuda/NOTES.md | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nvidia-cuda/NOTES.md b/src/nvidia-cuda/NOTES.md index cab2bbe..db2b843 100644 --- a/src/nvidia-cuda/NOTES.md +++ b/src/nvidia-cuda/NOTES.md @@ -10,14 +10,19 @@ Follow [NVIDIA's instructions to install the NVIDIA Container Toolkit](https://d ### Enable GPU passthrough -Enable GPU passthrough to your devcontainer by adding `["--gpus", "all"]` to your devcontainer's `runArgs` property. Here's an example of a devcontainer with this property: +Enable GPU passthrough to your devcontainer by using `hostRequirements`. Here's an example of a devcontainer with this property: ```json { - "runArgs": ["--gpus", "all"] + "hostRequirements": { + "gpu": "optional" + } } ``` +> Note: Setting `gpu` property's value to `true` will work with GPU machine types, but fail with CPUs. Hence, setting it to `optional` works in both cases. See [schema](https://containers.dev/implementors/json_schema/#base-schema) for more configuration details. + + ## OS Support |