Closed before31 closed 1 year ago
I met the same problem with you.
When invoking cuda in container , I got the out of memory error. Even if I invoke the cudaGetDeviceCount method, I got the same error. Through the nvidia-smi in container, I can see the gpu memory is enough.
Same to you.
I can invoke cuda in Windows, but failure in WSL2 Ubuntu system.
Maybe this is a bug in wsl2, not in docker. Plz follow this issue in WSL repo. @Yonv1943 @ding92
There hasn't been any activity on this issue for a long time. If the problem is still relevant, add a comment on this issue. If not, this issue will be closed in 30 days.
Mark the issue as fresh with a /remove-lifecycle stale
comment.
Stale issues will be closed after an additional %v days of inactivity.
Prevent issues from auto-closing with a /lifecycle frozen
comment.
/lifecycle stale
/remove-lifecycle stale
There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale
comment.
If not, this issue will be closed in 30 days.
Prevent issues from auto-closing with a /lifecycle frozen
comment.
/lifecycle stale
/remove-lifecycle stale
There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale
comment.
If not, this issue will be closed in 30 days.
Prevent issues from auto-closing with a /lifecycle frozen
comment.
/lifecycle stale
/remove-lifecycle stale
Actual behavior
When invoking cuda in container , I got the
out of memory
error. Even if I invoke thecudaGetDeviceCount
method, I got the same error. Through thenvidia-smi
in container, I can see the gpu memory is enough.nvidia-smi
in Windows:+-----------------------------------------------------------------------------+ | NVIDIA-SMI 512.77 Driver Version: 512.77 CUDA Version: 11.6 | |-------------------------------+----------------------+----------------------+ | GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 NVIDIA GeForce ... WDDM | 00000000:02:00.0 Off | N/A | | 23% 34C P8 12W / 250W | 660MiB / 11264MiB | 4% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ | 1 NVIDIA GeForce ... WDDM | 00000000:03:00.0 Off | N/A | | 23% 29C P8 11W / 250W | 0MiB / 11264MiB | 0% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ | 2 NVIDIA GeForce ... WDDM | 00000000:82:00.0 Off | N/A | | 23% 29C P8 10W / 250W | 0MiB / 11264MiB | 0% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ | 3 NVIDIA GeForce ... WDDM | 00000000:83:00.0 Off | N/A | | 23% 27C P8 11W / 250W | 12MiB / 11264MiB | 0% Default | | | | N/A | +-------------------------------+----------------------+----------------------+
nvidia-smi
in container:+-----------------------------------------------------------------------------+ | NVIDIA-SMI 510.68.02 Driver Version: 512.77 CUDA Version: 11.6 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 NVIDIA GeForce ... On | 00000000:02:00.0 Off | N/A | | 23% 34C P8 11W / 250W | 651MiB / 11264MiB | 0% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ | 1 NVIDIA GeForce ... On | 00000000:03:00.0 Off | N/A | | 23% 29C P8 11W / 250W | 0MiB / 11264MiB | 0% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ | 2 NVIDIA GeForce ... On | 00000000:82:00.0 Off | N/A | | 23% 28C P8 10W / 250W | 0MiB / 11264MiB | 0% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ | 3 NVIDIA GeForce ... On | 00000000:83:00.0 Off | N/A | | 23% 27C P8 10W / 250W | 12MiB / 11264MiB | 0% Default | | | | N/A | +-------------------------------+----------------------+----------------------+
nvcc -V
in container:nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2019 NVIDIA Corporation Built on Wed_Oct_23_19:24:38_PDT_2019 Cuda compilation tools, release 10.2, V10.2.89
Expected behavior
I can invoke cuda in container normally.
Information
Linux version 5.10.102.1-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Wed Mar 2 00:30:59 UTC 2022
Output of
& "C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" check
docker run --rm -it --gpus=all nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark
got:
Steps to reproduce the behavior