Why can't I install cuML on wsl?

462 views Asked by At

Installing rapids and cuML is not working

I have Cuda installed (Cuda compilation tools, release 11.8, V11.8.89) in a Python 3.10.11 env in JN in VSC on wsl2 on a desktop running Windows 11, with the latest nvidia drivers.

This is what nvidia-smi shows

NVIDIA-SMI 535.54.04              Driver Version: 536.23       CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| 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 RTX 4090        On  | 00000000:09:00.0  On |                  Off |
| 33%   46C    P8              28W / 450W |   1173MiB / 24564MiB |      3%      Default |
|                                         |                      |                  N/A 

But when I run

conda create -n rapids -c rapidsai -c conda-forge -c nvidia  \
    cudf=23.04 cuml=23.04 cugraph=23.04 cuspatial=23.04 cuxfilter=23.04 cusignal=23.04 cucim=23.04 python=3.10 cudatoolkit=11.8

everything seems to install without any errors

But when I then check the installation with the recommended...

 import cudf
 print(cudf.Series([1, 2, 3]))

...I get this:

raise CudaSupportError(f"Error at driver init: {description}")
numba.cuda.cudadrv.error.CudaSupportError: Error at driver init: Call to cuInit results in CUDA_ERROR_NO_DEVICE (100)

And again, my nvidia-smi clearly shows that CUDA is properly installs and correctly identified my GPU.

Any suggestions for how to fix this?

1

There are 1 answers

2
Bradley Dice On

This may indicates a misconfiguration in your CUDA WSL setup. Some users have had success by uninstalling and reinstalling the CUDA Toolkit in WSL. Note that WSL users should not install CUDA drivers (the driver is supplied by Windows, not WSL) -- this is a common mistake for WSL users in my experience. If you're running Ubuntu, you want the apt package "cuda-toolkit" and not "cuda", which includes the driver. I recommend testing with another CUDA application to verify your setup, because the issue is probably not specific to cuML or cuDF.

See these related issues for more ideas: