vscode-remote-release
vscode-remote-release copied to clipboard
Enabling GPU
Issue Type: Bug
- VS Code Version: 1.69
- OS Version: Ubuntu 22
Steps to Reproduce:
- Use
.devcontainerwithnvcr.ioimage e.g. Dockerfile with only such entry should be enough:
FROM nvcr.io/nvidia/pytorch:22.06-py3
- Specify in
devconatiner.jsonin"runArgs"enabling gpu (in any way: ID, whole gpu name) e.g. :
"runArgs": ["--gpus all"],
- Use
Reopen in container(just build conatiner with extension) and u should see error just at then end thatdocker runfailed
I tried to reproduce bug on many systems and on all of them the bug happens (Ubuntu 18, 22, Mint 20) Extension version: 0.241.3 VS Code version: Code 1.69.2 (3b889b090b5ad5793f524b5d1d39fda662b96a2a, 2022-07-18T16:14:10.636Z) OS version: Linux x64 5.4.0-122-generic Restricted Mode: No
Same here. Docker run fails. And the log has an entry that says "unknown flag: --gpus all". Looks like --gpus was introduced in API v1.40: see, --gpus entry at https://docs.docker.com/engine/reference/commandline/run/
I'm running Windows 10 (21H2) with WSL2 (using Ubuntu distro; version 20.04) and docker desktop (docker ver 20.10.17 on Windows and ver 20.10.12 when integrated on WSL). When I use docker run in the Windows command prompt, I can use the --gpus all flag and it creates a container without a problem (and makes the gpu available in that container).
I just used "-gpus=all" (notice use of equals) in the runArgs and it created and attached the container without error. I used it on the kaggle gpu image and have access to the gpu.
We are adding "hostRequirements"."gpu" to the devcontainer.json. That will enable GPU support on the container if a GPU is detected. Keeping this issue to track adding a "gpu" flag to let the user control it without relying on the detection.
@chrmarti is the hostRequirements.gpu option available in GitHub Codespaces? cannot seem to find it in the documentation.
@craiglpeters Is GPU support for Codespaces still in preview? (See above question.)