You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GPU device not found in running RapidsAI Docker container in WSL
nvidia-smican see the device
2.1. in Windows
2.2. in WSL
2.3. from within the running RapidsAI container (in WSL), via the ipython prompt
2.4. from within the running RapidsAI container (in WSL), via the run command override
For step 1 above (from WSL):
$ docker run --gpus all --pull always --rm -it \
--shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 \
nvcr.io/nvidia/rapidsai/base:24.04-cuda12.2-py3.11
24.04-cuda12.2-py3.11: Pulling from nvidia/rapidsai/base
Digest: sha256:a9ec3f43016242a11354abf70f545abdd9623239b0a3a1c9a1da65ddd75f3d55
Status: Image is up to date for nvcr.io/nvidia/rapidsai/base:24.04-cuda12.2-py3.11
This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.download.nvidia.com/licenses/NVIDIA_Deep_Learning_Container_License.pdf
Python 3.11.9 | packaged by conda-forge | (main, Apr 19 2024, 18:36:13) [GCC 12.3.0]
Type 'copyright', 'credits' or 'license'for more information
IPython 8.22.2 -- An enhanced Interactive Python. Type '?'for help.
In [1]: import cudf
/opt/conda/lib/python3.11/site-packages/cudf/utils/_ptxcompiler.py:61: UserWarning: Error getting driver and runtime versions:
stdout:
stderr:
Traceback (most recent call last):
File "/opt/conda/lib/python3.11/site-packages/numba/cuda/cudadrv/driver.py", line 254, in ensure_initialized
self.cuInit(0)
File "/opt/conda/lib/python3.11/site-packages/numba/cuda/cudadrv/driver.py", line 327, in safe_cuda_api_call
self._check_ctypes_error(fname, retcode)
File "/opt/conda/lib/python3.11/site-packages/numba/cuda/cudadrv/driver.py", line 395, in _check_ctypes_error
raise CudaAPIError(retcode, msg)
numba.cuda.cudadrv.driver.CudaAPIError: [500] Call to cuInit results in CUDA_ERROR_NOT_FOUND
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 4, in<module>
File "/opt/conda/lib/python3.11/site-packages/numba/cuda/cudadrv/driver.py", line 292, in __getattr__
self.ensure_initialized()
File "/opt/conda/lib/python3.11/site-packages/numba/cuda/cudadrv/driver.py", line 258, in ensure_initialized
raise CudaSupportError(f"Error at driver init: {description}")
numba.cuda.cudadrv.error.CudaSupportError: Error at driver init: Call to cuInit results in CUDA_ERROR_NOT_FOUND (500)
Not patching Numba
warnings.warn(msg, UserWarning)
/opt/conda/lib/python3.11/site-packages/cudf/utils/gpu_utils.py:149: UserWarning: No NVIDIA GPU detected
warnings.warn("No NVIDIA GPU detected")
Steps/Code to reproduce bug
I followed the following instructions (found here)
Generate and run the RAPIDS docker command based on your desired configuration using the RAPIDS Release Selector.
Inside the Docker instance, run this code to check that the RAPIDS installation is working:
importcudfprint(cudf.Series([1, 2, 3]))
Note: For step 5 above, the Release Selector provided me with the following docker command:
docker run --gpus all --pull always --rm -it \
--shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 \
nvcr.io/nvidia/rapidsai/base:24.04-cuda12.2-py3.11
Expected behavior
The expectation was that the following line of python would execute, and not raise an exception with "No NVIDIA GPU detected":
importcudf
Environment details (please complete the following information):
WSL2 on Windows 10
Docker Desktop using WSL engine
NVIDIA GeForce GTX 1080 Ti
The error occurs when executed via Docker, within the following WSL distros: Ubuntu-22.02 and Ubuntu-24.04
Additional context
From Powershell
> wsl --version
WSL version: 2.1.5.0
Kernel version: 5.15.146.1-2
WSLg version: 1.0.60
MSRDC version: 1.2.5105
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.4412> wsl --list -v
NAME STATE VERSION
* Ubuntu-24.04 Running 2
docker-desktop Running 2
docker-desktop-data Running 2
Ubuntu-22.04 Running 2> docker --version
Docker version 26.1.1, build 4cf5afa
> docker info
Client:
Version: 26.1.1
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.14.0-desktop.1
Path: C:\Program Files\Docker\cli-plugins\docker-buildx.exe
compose: Docker Compose (Docker Inc.)
Version: v2.27.0-desktop.2
Path: C:\Program Files\Docker\cli-plugins\docker-compose.exe
debug: Get a shell into any image or container (Docker Inc.)
Version: 0.0.29
Path: C:\Program Files\Docker\cli-plugins\docker-debug.exe
dev: Docker Dev Environments (Docker Inc.)
Version: v0.1.2
Path: C:\Program Files\Docker\cli-plugins\docker-dev.exe
extension: Manages Docker extensions (Docker Inc.)
Version: v0.2.23
Path: C:\Program Files\Docker\cli-plugins\docker-extension.exe
feedback: Provide feedback, right in your terminal! (Docker Inc.)
Version: v1.0.4
Path: C:\Program Files\Docker\cli-plugins\docker-feedback.exe
init: Creates Docker-related starter files for your project (Docker Inc.)
Version: v1.1.0
Path: C:\Program Files\Docker\cli-plugins\docker-init.exe
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
Version: 0.6.0
Path: C:\Program Files\Docker\cli-plugins\docker-sbom.exe
scout: Docker Scout (Docker Inc.)
Version: v1.8.0
Path: C:\Program Files\Docker\cli-plugins\docker-scout.exe
Server:
Containers: 2
Running: 2
Paused: 0
Stopped: 0
Images: 6
Server Version: 26.1.1
Storage Driver: overlayfs
driver-type: io.containerd.snapshotter.v1
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: e377cd56a71523140ca6ae87e30244719194a521
runc version: v1.1.12-0-g51d5e94
init version: de40ad0
Security Options:
seccomp
Profile: unconfined
Kernel Version: 5.15.146.1-microsoft-standard-WSL2
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 16
Total Memory: 7.731GiB
Name: docker-desktop
ID: 2e51595d-9630-4374-b2c6-a01e13c0e11f
Docker Root Dir: /var/lib/docker
Debug Mode: false
HTTP Proxy: http.docker.internal:3128
HTTPS Proxy: http.docker.internal:3128
No Proxy: hubproxy.docker.internal
Labels:
com.docker.desktop.address=npipe://\\.\pipe\docker_cli
Experimental: false
Insecure Registries:
hubproxy.docker.internal:5555127.0.0.0/8
Live Restore Enabled: false
WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
WARNING: daemon is not using the default seccomp profile
> nvidia-smi
Sun Jun 200:17:432024+-----------------------------------------------------------------------------------------+| NVIDIA-SMI 555.85 Driver Version: 555.85 CUDA Version: 12.5||-----------------------------------------+------------------------+----------------------+| GPU Name Driver-Model | Bus-Id Disp.A | Volatile Uncorr. ECC || Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |||| MIG M. ||=========================================+========================+======================||0 NVIDIA GeForce GTX 1080 Ti WDDM |00000000:23:00.0 On | N/A ||40% 25C P8 21W / 250W | 1600MiB / 11264MiB |0%Default|||| N/A |+-----------------------------------------+------------------------+----------------------++-----------------------------------------------------------------------------------------+| Processes: || GPU GI CI PID Type Process name GPU Memory || ID ID Usage ||=========================================================================================||0 N/A N/A 2740 C+G ...1.0_x64__8wekyb3d8bbwe\Video.UI.exe N/A ||0 N/A N/A 2836 C+G ...Programs\Microsoft VS Code\Code.exe N/A ||0 N/A N/A 5584 C+G ...on\125.0.2535.79\msedgewebview2.exe N/A ||0 N/A N/A 5876 C+G C:\Windows\explorer.exe N/A ||0 N/A N/A 7912 C+G ...oogle\Chrome\Application\chrome.exe N/A ||0 N/A N/A 9012 C+G ...2txyewy\StartMenuExperienceHost.exe N/A ||0 N/A N/A 9400 C+G ....Search_cw5n1h2txyewy\SearchApp.exe N/A ||0 N/A N/A 12396 C+G ...__8wekyb3d8bbwe\WindowsTerminal.exe N/A ||0 N/A N/A 14452 C+G ...CBS_cw5n1h2txyewy\TextInputHost.exe N/A ||0 N/A N/A 16392 C+G ...GeForce Experience\NVIDIA Share.exe N/A ||0 N/A N/A 17580 C+G ....Search_cw5n1h2txyewy\SearchApp.exe N/A ||0 N/A N/A 19060 C+G ...5n1h2txyewy\ShellExperienceHost.exe N/A ||0 N/A N/A 20140 C+G ...\Docker\frontend\Docker Desktop.exe N/A |+-----------------------------------------------------------------------------------------+
From WSL Ubuntu-22.04
$ docker run --rm --gpus all ubuntu nvidia-smi
Sat Jun 1 14:00:12 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 555.42.03 Driver Version: 555.85 CUDA Version: 12.5 ||-----------------------------------------+------------------------+----------------------+
| 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 GTX 1080 Ti On | 00000000:23:00.0 On | N/A || 40% 25C P8 21W / 250W | 1475MiB / 11264MiB | 0% Default |||| N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: || GPU GI CI PID Type Process name GPU Memory || ID ID Usage ||=========================================================================================|| 0 N/A N/A 33 G /Xwayland N/A || 0 N/A N/A 38 G /Xwayland N/A || 0 N/A N/A 45 G /Xwayland N/A || 0 N/A N/A 62 G /Xwayland N/A |
+-----------------------------------------------------------------------------------------+
$ docker run --rm --gpus all nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark
Run "nbody -benchmark [-numbodies=<numBodies>]" to measure performance.
-fullscreen (run n-body simulation in fullscreen mode)
-fp64 (use double precision floating point values for simulation)
-hostmem (stores simulation data in host memory)
-benchmark (run benchmark to measure performance)
-numbodies=<N> (number of bodies (>= 1) to run in simulation)
-device=<d> (where d=0,1,2.... for the CUDA device to use)
-numdevices=<i> (where i=(number of CUDA devices > 0) to use for simulation)
-compare (compares simulation results running once on the default GPU and once on the CPU)
-cpu (run n-body simulation on the CPU)
-tipsy=<file.bin> (load a tipsy model file for simulation)
NOTE: The CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enabled.
Error: only 0 Devices available, 1 requested. Exiting.
$ docker run --gpus all --pull always --rm -it \
--shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 \
nvcr.io/nvidia/rapidsai/base:24.04-cuda12.2-py3.11
24.04-cuda12.2-py3.11: Pulling from nvidia/rapidsai/base
Digest: sha256:a9ec3f43016242a11354abf70f545abdd9623239b0a3a1c9a1da65ddd75f3d55
Status: Image is up to date for nvcr.io/nvidia/rapidsai/base:24.04-cuda12.2-py3.11
This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.download.nvidia.com/licenses/NVIDIA_Deep_Learning_Container_License.pdf
Python 3.11.9 | packaged by conda-forge | (main, Apr 19 2024, 18:36:13) [GCC 12.3.0]
Type 'copyright', 'credits' or 'license'for more information
IPython 8.22.2 -- An enhanced Interactive Python. Type '?'for help.
In [1]: import cudf
/opt/conda/lib/python3.11/site-packages/cudf/utils/_ptxcompiler.py:61: UserWarning: Error getting driver and runtime versions:
stdout:
stderr:
Traceback (most recent call last):
File "/opt/conda/lib/python3.11/site-packages/numba/cuda/cudadrv/driver.py", line 254, in ensure_initialized
self.cuInit(0)
File "/opt/conda/lib/python3.11/site-packages/numba/cuda/cudadrv/driver.py", line 327, in safe_cuda_api_call
self._check_ctypes_error(fname, retcode)
File "/opt/conda/lib/python3.11/site-packages/numba/cuda/cudadrv/driver.py", line 395, in _check_ctypes_error
raise CudaAPIError(retcode, msg)
numba.cuda.cudadrv.driver.CudaAPIError: [500] Call to cuInit results in CUDA_ERROR_NOT_FOUND
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 4, in<module>
File "/opt/conda/lib/python3.11/site-packages/numba/cuda/cudadrv/driver.py", line 292, in __getattr__
self.ensure_initialized()
File "/opt/conda/lib/python3.11/site-packages/numba/cuda/cudadrv/driver.py", line 258, in ensure_initialized
raise CudaSupportError(f"Error at driver init: {description}")
numba.cuda.cudadrv.error.CudaSupportError: Error at driver init: Call to cuInit results in CUDA_ERROR_NOT_FOUND (500)
Not patching Numba
warnings.warn(msg, UserWarning)
/opt/conda/lib/python3.11/site-packages/cudf/utils/gpu_utils.py:149: UserWarning: No NVIDIA GPU detected
warnings.warn("No NVIDIA GPU detected")
In [2]: !nvidia-smi
Sat Jun 1 14:01:04 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 555.42.03 Driver Version: 555.85 CUDA Version: 12.5 ||-----------------------------------------+------------------------+----------------------+
| 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 GTX 1080 Ti On | 00000000:23:00.0 On | N/A || 40% 25C P8 20W / 250W | 1484MiB / 11264MiB | 6% Default |||| N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: || GPU GI CI PID Type Process name GPU Memory || ID ID Usage ||=========================================================================================|| 0 N/A N/A 33 G /Xwayland N/A || 0 N/A N/A 38 G /Xwayland N/A || 0 N/A N/A 45 G /Xwayland N/A || 0 N/A N/A 62 G /Xwayland N/A |
+-----------------------------------------------------------------------------------------+
From WSL Ubuntu-24.04
$ docker run --gpus all --pull always --rm -it \
--shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 \
nvcr.io/nvidia/rapidsai/base:24.04-cuda12.2-py3.11
24.04-cuda12.2-py3.11: Pulling from nvidia/rapidsai/base
24.04-cuda12.2-py3.11: Pulling from nvidia/rapidsai/base
Digest: sha256:a9ec3f43016242a11354abf70f545abdd9623239b0a3a1c9a1da65ddd75f3d55
Status: Image is up to date for nvcr.io/nvidia/rapidsai/base:24.04-cuda12.2-py3.11
This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.download.nvidia.com/licenses/NVIDIA_Deep_Learning_Container_License.pdf
Python 3.11.9 | packaged by conda-forge | (main, Apr 19 2024, 18:36:13) [GCC 12.3.0]
Type 'copyright', 'credits' or 'license'for more information
IPython 8.22.2 -- An enhanced Interactive Python. Type '?'for help.
In [1]: import cudf
/opt/conda/lib/python3.11/site-packages/cudf/utils/_ptxcompiler.py:61: UserWarning: Error getting driver and runtime versions:
stdout:
stderr:
Traceback (most recent call last):
File "/opt/conda/lib/python3.11/site-packages/numba/cuda/cudadrv/driver.py", line 254, in ensure_initialized
self.cuInit(0)
File "/opt/conda/lib/python3.11/site-packages/numba/cuda/cudadrv/driver.py", line 327, in safe_cuda_api_call
self._check_ctypes_error(fname, retcode)
File "/opt/conda/lib/python3.11/site-packages/numba/cuda/cudadrv/driver.py", line 395, in _check_ctypes_error
raise CudaAPIError(retcode, msg)
numba.cuda.cudadrv.driver.CudaAPIError: [500] Call to cuInit results in CUDA_ERROR_NOT_FOUND
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 4, in<module>
File "/opt/conda/lib/python3.11/site-packages/numba/cuda/cudadrv/driver.py", line 292, in __getattr__
self.ensure_initialized()
File "/opt/conda/lib/python3.11/site-packages/numba/cuda/cudadrv/driver.py", line 258, in ensure_initialized
raise CudaSupportError(f"Error at driver init: {description}")
numba.cuda.cudadrv.error.CudaSupportError: Error at driver init: Call to cuInit results in CUDA_ERROR_NOT_FOUND (500)
Not patching Numba
warnings.warn(msg, UserWarning)
/opt/conda/lib/python3.11/site-packages/cudf/utils/gpu_utils.py:149: UserWarning: No NVIDIA GPU detected
warnings.warn("No NVIDIA GPU detected")
In [2]: !nvidia-smi
Sat Jun 1 14:22:59 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 555.42.03 Driver Version: 555.85 CUDA Version: 12.5 ||-----------------------------------------+------------------------+----------------------+
| 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 GTX 1080 Ti On | 00000000:23:00.0 On | N/A || 40% 25C P8 17W / 250W | 1632MiB / 11264MiB | 3% Default |||| N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: || GPU GI CI PID Type Process name GPU Memory || ID ID Usage ||=========================================================================================|| 0 N/A N/A 33 G /Xwayland N/A || 0 N/A N/A 38 G /Xwayland N/A || 0 N/A N/A 45 G /Xwayland N/A || 0 N/A N/A 62 G /Xwayland N/A |
+-----------------------------------------------------------------------------------------+
From WSL (both distros: Ubuntu-22.04 and Ubuntu-24.04):
docker run --gpus all --pull always --rm -it \
--shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 \
nvcr.io/nvidia/rapidsai/base:24.04-cuda12.2-py3.11 nvidia-smi
24.04-cuda12.2-py3.11: Pulling from nvidia/rapidsai/base
Digest: sha256:a9ec3f43016242a11354abf70f545abdd9623239b0a3a1c9a1da65ddd75f3d55
Status: Image is up to date for nvcr.io/nvidia/rapidsai/base:24.04-cuda12.2-py3.11
This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.download.nvidia.com/licenses/NVIDIA_Deep_Learning_Container_License.pdf
Sat Jun 1 14:36:23 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 555.42.03 Driver Version: 555.85 CUDA Version: 12.5 ||-----------------------------------------+------------------------+----------------------+
| 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 GTX 1080 Ti On | 00000000:23:00.0 On | N/A || 40% 24C P8 22W / 250W | 1637MiB / 11264MiB | 0% Default |||| N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: || GPU GI CI PID Type Process name GPU Memory || ID ID Usage ||=========================================================================================|| 0 N/A N/A 33 G /Xwayland N/A || 0 N/A N/A 38 G /Xwayland N/A || 0 N/A N/A 45 G /Xwayland N/A || 0 N/A N/A 62 G /Xwayland N/A |
+-----------------------------------------------------------------------------------------+
The text was updated successfully, but these errors were encountered:
I'm not very familiar with WSL2, but I see that you are using a NVIDIA GeForce GTX 1080 Ti which is a Pascal generation GPU.
Unfortunately, Pascal support was dropped starting with RAPIDS 24.02 (https://docs.rapids.ai/notices/rsn0034/). You could try a 23.12 image such as rapidsai/base:23.12-cuda12.0-py3.10, but it's not officially supported anymore.
Describe the bug
nvidia-smi
can see the device2.1. in Windows
2.2. in WSL
2.3. from within the running RapidsAI container (in WSL), via the
ipython
prompt2.4. from within the running RapidsAI container (in WSL), via the run command override
For step 1 above (from WSL):
Steps/Code to reproduce bug
Note: For step 5 above, the Release Selector provided me with the following docker command:
Expected behavior
The expectation was that the following line of python would execute, and not raise an exception with "No NVIDIA GPU detected":
Environment details (please complete the following information):
Ubuntu-22.02
andUbuntu-24.04
Additional context
Ubuntu-22.04
Ubuntu-24.04
Ubuntu-22.04
andUbuntu-24.04
):The text was updated successfully, but these errors were encountered: