Nvidia-cuda: Update notes regarding gpu enablement (#608)
* Nvidia-cuda: Update notes regarding gpu enablement * use GPU hostRequirements instead * nit * use gpu:optional instead
This commit is contained in:
parent
c4ffeebdac
commit
07693965d7
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue