This is great! Many people have Windows machine with a RTX 3080 or 3090, that they use for gaming and now they can tinker with ML without having to dual boot to Linux.
I'm very interested in seeing a part 2 of this referring to the things you mentioned towards the end, you gained a new subscriber, thank you for this video!
Really good information, I didn't know that you could use your GPU in linux to machine learning development . I wasn't ready for windows 11 and upgraded my Windows 10 to version 21H2 an worked perfectly!
Dude, I been trying to get this to work with Docker Desktop for a week, and couldn't figure out what I was doing wrong lol. Thanks for pointing out my flaw. Will try this today.
Jeff one of the problem that I ran into was running CUDA GUI program under WSL2. When you install the CUDA Toolkit for WSL2 you get a bunch of example CUDA programs with their source code. Most of the text based CUDA applications work fine BUT when you run any of the GUI CUDA examples such as Mandelbrot, simpleTexture3D, volumeRender, particles, oceanFFT etc. or basically any of the GUI apps from their Graphics, Imaging or Simulation directories you will basically get the same program errors and then a segmentation fault. The explanation I got from Microsoft was this is because CUDA GUI application require the NVIDIA native GL driver which exposes extension for CUDA. OpenGL is accelerated in WSLg through Mesa mapping on top of our vGPU/DX12 projection and Mesa doesn’t support those CUDA extension. To support this would require NVIDIA to bring their native GL driver to WSL. This was back in November and I tried addressing this with nVidia but they pretty much ignored it. If you have a need (which I do) to do CUDA graphics programming this will be a problem.
I found the actual start to finish time super informative. I remember the first time I Installed Tensorflow gpu. You made it look like it took five minutes, and it took me two days😊
Thanks for the video. I am just testing it with RTX 4090. For the moment it seems to be promising on both Tensorflow and PyTorch. Performances looks not that bad and I really like the deep integration between Windows, Ubuntu and Docker. Just one thing I am not 100% comfortable with is the resource management and especially the RAM. Let’s play and see. Thanks again for pointing me to WSL2.
you have very thorough and informative videos, concise, and I just wanted to mention I appreciate that! Many producers try to milk the minutes and less is always best. :) thanks!
Thank you so much! I was stuck on this install all day. Ended up I needed to upgrade windows, plus I didnt leave the docker script run after the sleep. !!!!
Very useful video. I trashed a Windows install on my prior machine trying to dual-boot. I occasionally need Linux but with Graphics/GPU support (so plain WSL2 is not enough, but was otherwise nice in the past). WSLg with Windows 11 means I can now have it all from a single top level OS. Thanks for recording this in-depth video.
Excellent content, Professor. It really looks like WSL2 is becoming quite usable for ML. Interestingly, NVIDIA seems to have done some edits to the NVIDIA CUDA WSL2 Guide you linked to, basically hiding the info about setting up docker on WSL2 without Docker Desktop. Makes one wonder if Microsoft complained about not wanting to make it too easy for folks to figure out how to run docker on WSL2 without Docker Desktop 🤔...
Hi Jeff! Really thanks for your work. I have been trying to carry on this procedure for 2 days.. but when I come to the docker's benchmark test it always says "error: only 0 device available, 1 requested". I also checked with nvidia-smi the correct installation of the drivers ( NVD 512.15 , CUDA 11.6) and it also shows the GPU correctly. I hope you can help me to solve this problem..
Just got my laptop re-imaged so I'm going to try this, thanks for sharing. Not bad, looks like it only took an hour, give or take. With ChatGPT and the like taking the world by storm, if you have the time, could you make a video on training some domain knowledge data into ChatGPT or one of the open-source models like Alpaca or Falcon.
Thanks for clear explanation, I have build a docker file which have "nvidia/cuda:12.1.1-base-ubuntu20.04" img as base img, I am trying to run a python file in docker container. does I need to have my files in ubuntu directory, or I could keep them in a folder over the windows desktop, does i need to run docker compuse up commad from ubuntu terminal, or if i have windows docker desktop i could run the command on windows command prompt. thnx for the video
I installed docker desktop on PC, and configured wsl 2 there, then used docker image Ubuntu, so Ubuntu was on docker, couldn't figure out the rest from there. Could you try that process,and see if you can get any further?
This seems to only work with CUDA, unless I'm missing something. Does anybody know how to make it work with Vulkan? For me it's still listing llvmpipe (CPU based) as the only Vulkan device available.
Hello, I hope someone who knows better in the comment section might help me. I am unfortunate enough to have a dell XPS 9560 for which the Windows 11 upgrade was never allowed due to using i7, if I understand, so I am using windows 10. Anyway, I tried to follow the Nvidia+wsl2 guide and almost got it to work but then there is a step where I am required to run systemctl restart docker, after having installed nvifia-docker but this command failed and when I tried to run a test container it could not detect the GPU. A little search showed that I was probably using the in windows version of the wsl2, and should be using instead the app version. Now I am trying to download an upgrade I had not installed kb5020030 as this should let me install the app store version which will have systemd . Clearly not having windows 11 makes this all more tricky, has anyone managed to work with cuda containers on wsl2 on windows 10? Does anyone have a specific guide? Thanks!
This is great! Many people have Windows machine with a RTX 3080 or 3090, that they use for gaming and now they can tinker with ML without having to dual boot to Linux.
you can also install CUDNN on windows and use some of it's performance, but it is far from optimal.
I'm very interested in seeing a part 2 of this referring to the things you mentioned towards the end, you gained a new subscriber, thank you for this video!
Super useful video, thanks Jeff! Looking forward to the other DL set-up videos!
Really good information, I didn't know that you could use your GPU in linux to machine learning development . I wasn't ready for windows 11 and upgraded my Windows 10 to version 21H2 an worked perfectly!
Dude, I been trying to get this to work with Docker Desktop for a week, and couldn't figure out what I was doing wrong lol. Thanks for pointing out my flaw. Will try this today.
Thanks Jeff this video got my wls woring on Windows 10 (Version 10.0.19044 Build 19044) with zero snags. 👍
Just upgraded to Win 11 and will be following your video. Thanks for recording and publishing at hi rez 2160, it really helps.
Jeff one of the problem that I ran into was running CUDA GUI program under WSL2. When you install the CUDA Toolkit for WSL2 you get a bunch of example CUDA programs with their source code. Most of the text based CUDA applications work fine BUT when you run any of the GUI CUDA examples such as Mandelbrot, simpleTexture3D, volumeRender, particles, oceanFFT etc. or basically any of the GUI apps from their Graphics, Imaging or Simulation directories you will basically get the same program errors and then a segmentation fault.
The explanation I got from Microsoft was this is because CUDA GUI application require the NVIDIA native GL driver which exposes extension for CUDA. OpenGL is accelerated in WSLg through Mesa mapping on top of our vGPU/DX12 projection and Mesa doesn’t support those CUDA extension. To support this would require NVIDIA to bring their native GL driver to WSL.
This was back in November and I tried addressing this with nVidia but they pretty much ignored it. If you have a need (which I do) to do CUDA graphics programming this will be a problem.
Please follow up here if you find a solution (and remember).
@@erikjohnson9112 Will do!
I found the actual start to finish time super informative. I remember the first time I Installed Tensorflow gpu. You made it look like it took five minutes, and it took me two days😊
Thanks for the video. I am just testing it with RTX 4090. For the moment it seems to be promising on both Tensorflow and PyTorch. Performances looks not that bad and I really like the deep integration between Windows, Ubuntu and Docker. Just one thing I am not 100% comfortable with is the resource management and especially the RAM. Let’s play and see. Thanks again for pointing me to WSL2.
you have very thorough and informative videos, concise, and I just wanted to mention I appreciate that! Many producers try to milk the minutes and less is always best. :) thanks!
Very thorough... He is a good teacher
Thank you so much! I was stuck on this install all day. Ended up I needed to upgrade windows, plus I didnt leave the docker script run after the sleep. !!!!
Since my main system is a Surface Book 3, I'd love to see more ML content using the Win 11/WSl 2 environment. Thanks!
Super useful as always, hats off to you Jeff
Very useful video. I trashed a Windows install on my prior machine trying to dual-boot. I occasionally need Linux but with Graphics/GPU support (so plain WSL2 is not enough, but was otherwise nice in the past). WSLg with Windows 11 means I can now have it all from a single top level OS. Thanks for recording this in-depth video.
Excellent content, Professor. It really looks like WSL2 is becoming quite usable for ML. Interestingly, NVIDIA seems to have done some edits to the NVIDIA CUDA WSL2 Guide you linked to, basically hiding the info about setting up docker on WSL2 without Docker Desktop. Makes one wonder if Microsoft complained about not wanting to make it too easy for folks to figure out how to run docker on WSL2 without Docker Desktop 🤔...
Hi Jeff! Really thanks for your work. I have been trying to carry on this procedure for 2 days.. but when I come to the docker's benchmark test it always says "error: only 0 device available, 1 requested". I also checked with nvidia-smi the correct installation of the drivers ( NVD 512.15 , CUDA 11.6) and it also shows the GPU correctly. I hope you can help me to solve this problem..
Hi Jeff,
the NVIDIA CUDA WSL2 Guide has been updated, could you please update the video accordingly?
Hey, Jeff! Great to see you again!
would pip installing pytorch for cuda work in the docker env?
THIS VIDEO MADE LIFE SO MUCH EASIER. THANKS!!!
Thanks for the phenomenal video! Going to try this out 🎉
Thank you for making these videos it is much appreciated!
Just got my laptop re-imaged so I'm going to try this, thanks for sharing. Not bad, looks like it only took an hour, give or take. With ChatGPT and the like taking the world by storm, if you have the time, could you make a video on training some domain knowledge data into ChatGPT or one of the open-source models like Alpaca or Falcon.
Hey Jeff, thanks a lot for another video, I was wondering what is your opinion, it is the same to develop on WSL 2 Linux as a Linux OS?
Thanks! this is a very usefull video! I also use the program GeForce Experience software from Nvidia to maintain the Drivers updated!
Thanks Jeff! do you have examples on how you have used WSL2 for your projects?
yes please more wsl2 and cuda videos
Thank you sir, but how can we change kernel? How to do that! Or i want to use conda in docker is this possible?
Thanks for clear explanation, I have build a docker file which have "nvidia/cuda:12.1.1-base-ubuntu20.04" img as base img, I am trying to run a python file in docker container. does I need to have my files in ubuntu directory, or I could keep them in a folder over the windows desktop, does i need to run docker compuse up commad from ubuntu terminal, or if i have windows docker desktop i could run the command on windows command prompt. thnx for the video
I installed docker desktop on PC, and configured wsl 2 there, then used docker image Ubuntu, so Ubuntu was on docker, couldn't figure out the rest from there. Could you try that process,and see if you can get any further?
I think you must do sudo permission to access inside the /mnt/c, professor. Appreciated for your help.
Thank you for this great tutorial. I was wondering if you know how to use an IDE like VScode (free for docker images). Do you have a video on that???
This seems to only work with CUDA, unless I'm missing something. Does anybody know how to make it work with Vulkan? For me it's still listing llvmpipe (CPU based) as the only Vulkan device available.
Cant we upgrade tensorflow version??
Is there a way to use gstreamer in docker container with gpu.
I have docker... Can i do the cuda part latter
is there any performance drop in the GPU in WSL2 ?
Hello, I hope someone who knows better in the comment section might help me. I am unfortunate enough to have a dell XPS 9560 for which the Windows 11 upgrade was never allowed due to using i7, if I understand, so I am using windows 10. Anyway, I tried to follow the Nvidia+wsl2 guide and almost got it to work but then there is a step where I am required to run systemctl restart docker, after having installed nvifia-docker but this command failed and when I tried to run a test container it could not detect the GPU. A little search showed that I was probably using the in windows version of the wsl2, and should be using instead the app version. Now I am trying to download an upgrade I had not installed kb5020030 as this should let me install the app store version which will have systemd . Clearly not having windows 11 makes this all more tricky, has anyone managed to work with cuda containers on wsl2 on windows 10? Does anyone have a specific guide? Thanks!
this works for kali too?
Amazing video, but I think it's time for a new one after 2 years 😅 somethings have changed.
Did you have the drawing for the GPU yet?
Yes, I will post something on the winner soon.
Can this work on windows 10?
very useful
I'd like to see more of working with Tao,and other NGC containers
with wsl2 please.
Sure, let me add more NGC to the list.