-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Specifying specific GPUs for the devcontainer. #1741
Comments
@bjajoh I haven't tried this myself, but I wonder if adding some escaped quoted to your runArgs would work? If
|
@jkeech It sadly dows not work: |
There's probably some amount of nested escaping of the quotes in the devcontainer.json that needs to happen to end up with the docker process spawn args having the desired quotes. I would play around with different levels of quoting and quote escaping in the runArgs value. |
Also encountering this issue. Alternative might be to set the env variable NVIDIA_VISIBLE_DEVICES instead of passing through --gpus. Although it would be nice to be able to know how escaping the quote would work https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/user-guide.html#gpu-enumeration
|
@ryxli It actually works! Thank you so much! |
Hi,
I encountered an issue while trying to run two devcontainers on the same system (4 GPUs) and tried to allocate 2 GPUs to each.
This works and does exactly what I want:
docker run --gpus '"device=2,3"' nvidia/cuda:9.0-base nvidia-smi
This also works as documented for the devcontainer:
However when trying to use two specific GPUs, it fails.
I think this might be due to the way docker is expecting this device string in case of multiple GPUs.
The text was updated successfully, but these errors were encountered: