I have a problem installing CUDA on the WSL Distro Kali Linux, installing CUDA Toolkit, and Nvidia Driver there, and when I run a program that needs the GPU, such as tensorflow, it returns saying "I haven’t found the GPU ", something like that, I already researched a lot, and I have not seen anywhere to say definitively that the Distro Kali-Linux in WSL does not yet have support with the GPU.
Thank you for reaching out
Have you tried with Ubuntu and see if WSL is able to detect the GPU at all ?
Yes, with Ubuntu, he detected my GPU, I use Kali-Linux more, as it is one of the only ones to have a graphical environment.
Using Docker Desktop is very easy to make docker run inside Kali-linux. Just enable the WSL integration for that distro in the Options. Docker Desktop version 3.3.1 is the only version that works for me with gpu though.
So, I have the Docker updated, and I don’t suffer from this problem, my problem is the GPU, how did you manage to put the GPU to work in the Kali-Linux Distro in WSL 2?
If the file
/dev/dxg exists then the gpu is available inside Kali. Then you can install Docker Desktop for Windows and enable the kali integration:
I will check if there is a path / dev / dxg, as Docker is already connected to Kali Linux.
Well, I don’t find the file /dev/dxg
What’s your Windows build (run
Post the output of
wsl.exe -l -v from cmd
uname -a from inside kali-linux.
Both systems, Windows 10 and WSL2 are the last released today.
Build 19042 is not enough. For GPU access inside WSL2 you need at least Windows Insider build 20145 from Dev channel. See CUDA on WSL :: CUDA Toolkit Documentation (nvidia.com)
Is using Windows Insider really safe, is it updating all the time, or is it just talk?
Windows Insider in the Dev channel is pretty aggressive with the Updates. At least once a week, that’s why is recommended to install it in a spare PC/laptop.
CUDA in WSL2 is expected to be released for everyone in October 21H2 release.