Install WSL2 on Windows 11 with NVIDIA CUDA 11.8

  Рет қаралды 33,285

Archive

Archive

Күн бұрын

Пікірлер: 72
@ParatrooperK
@ParatrooperK Жыл бұрын
Ladies and gentlemen, this person right here is the textbook definition of a true Chad. After hours and hours of following the Nvidia documentation and going through Stack Overflow, I was starting to lose hope. Once I saw your video, I was able to get everything working perfectly. Wish I had come across this sooner. Thanks for the clear and concise video!
@Archive-pg2zn
@Archive-pg2zn Жыл бұрын
Thanks a lot! Glad it helped you!
@pixelrogue
@pixelrogue Жыл бұрын
Man, the nvidia documentation is TRASH.
@romayojr
@romayojr 3 ай бұрын
amazing tutorial - this still works in 2024. thank you kindly, good sir!
@_fl3x_up_
@_fl3x_up_ 3 ай бұрын
did u install with cuda 11.8 or the newer versions?
@CarlWells-b4s
@CarlWells-b4s 3 ай бұрын
same question: did you use cuda toolkit 11.8 or a newer one? (e.g. 12.5)
@romayojr
@romayojr Ай бұрын
@@CarlWells-b4s 11.8 just like the video suggested
@romayojr
@romayojr Ай бұрын
@@_fl3x_up_ 11.8 just like the video suggested
@philwebb59
@philwebb59 Жыл бұрын
1:05 As of 2023-08-05, after installing Ubuntu from powershell, it doesn't launch because wsl 2 "requires an update to its lethal component." You need to do a `wsl --update` after you reboot.
@JohananJoysingh
@JohananJoysingh 2 ай бұрын
Amazing. So clear and straight forward.
@IdPreferNot1
@IdPreferNot1 10 ай бұрын
THANK YOU! After thrashing through several install docs, repos and youtube videios...was about to give up... then saw your detailed step by step video that was the trick. All the other instructions never came close to succes or this detail of steps. Would never get my AI models GPU acceleration without this!!
@AkashaVaani-mx7cq
@AkashaVaani-mx7cq 7 күн бұрын
Perfect. That worked like a charm. Thank you so much bro... Glad to watch your video. Keep going.
@cavu2555
@cavu2555 26 күн бұрын
hello I have a question. this instruction doesn't explicitly install cudnn which is required by a lot deep learning packages according to their official documents. So I wonder if it's necessary to do so to prevent any potential problems
@SilverCodeGuru
@SilverCodeGuru 4 ай бұрын
After going through nvidia documentation many times and watching and following one other video, I was about to give up. And even after seeing this video, I still found finding cuda toolkit for wsl very difficult. I was expecting to see wsl ubuntu as operating system but it showed up only after selecting linux and architecture as x86_64. @archive you could have also explained your choice of cuda version 11.8. It was only when i reached pytorch installation, i understood I should have stuck with 12.1 instead of choosing the latest 12.5. pytorch worked even with the version mismatch.
@carterstevenson1536
@carterstevenson1536 11 ай бұрын
Thank you so much!! Worked over 6hrs on searching for solution until I saw your video. That's really helpful!
@Archive-pg2zn
@Archive-pg2zn 11 ай бұрын
Great! I'm glad it worked.
@TVPInterpolation
@TVPInterpolation 2 ай бұрын
little question here: im having issues that docker on windows does not allow me to only send infos of my second gpu into the container. i wanna make sure that it just only runs at the second one.
@CarlWells-b4s
@CarlWells-b4s 3 ай бұрын
Great video. Would this work with a newer cuda toolkit e.g. 12.5?
@GMS-k1g
@GMS-k1g 13 күн бұрын
Brother you are the hero we never deserved but always needed.
@arthura9619
@arthura9619 Жыл бұрын
After hours and hours trying, this saves my day, thanks
@Archive-pg2zn
@Archive-pg2zn Жыл бұрын
That's awesome!
@esteban.marinone
@esteban.marinone Жыл бұрын
Hey there! First of all thanks for uploading this video. I'd like to know if I can install the latest version of Tensorflow (instead of pytorch) using this method. I believe it is the same. And also, once it is installed, is it available on Virtual Studio directly or do I have to do arrangements first? Thanks in advance, regards from Argentina.
@tobiasmuenchow9884
@tobiasmuenchow9884 10 ай бұрын
Same question here :D
@shuaishao6114
@shuaishao6114 7 ай бұрын
appreciate your time to create this! managed to set up my dev environment for ML, thanks!
@pilooop667
@pilooop667 Жыл бұрын
würde mich sehr über weitere Videos zu wsl2 + AI anwendung/training freuen
@Aisys-pk
@Aisys-pk 7 ай бұрын
I am getting this error when I do nvidia-smi Failed to initialize NVML: GPU access blocked by the operating system Failed to properly shut down NVML: GPU access blocked by the operating system
@lucasborges1751
@lucasborges1751 6 ай бұрын
THANK YOU! I LOVE U 🇧🇷🇧🇷🇧🇷🇧🇷🇧🇷
@eriikrasniqii7068
@eriikrasniqii7068 5 ай бұрын
after running the "sudo apt-get -y install cuda" I get a Blue screen of death with code "page fault in nonpaged area" what could be the error?
@shirleyyli128
@shirleyyli128 3 ай бұрын
goated
@aronldmanki2035
@aronldmanki2035 Жыл бұрын
why is this happening? NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
@Archive-pg2zn
@Archive-pg2zn Жыл бұрын
Hi, this is probably because there are Nvidia Drivers installed on the ubuntu machine. This must not be the case for nvidia cuda to work properly on the wsl2 platform. WSL2 uses the Nvidia Drivers on Windows. Update your Nvidia Drivers on Windows first. Reboot your PC afterwards. Although the commands will most likely not work, you might try following commands in order: WSL2 Prompt: #sudo apt-get purge nvidia-* Windows CMD Prompt: #wsl -t Ubuntu wait for at least 10 seconds #wsl WSL2 Prompt: #sudo apt install nvidia-cuda-toolkit Windows CMD Prompt: #wsl -t Ubuntu wait for at least 10 seconds #wsl WSL2 Prompt: #nvidia-smi Be sure you're WSL machine is on version 2: C:\Users imda>wsl -l -v NAME STATE VERSION * Ubuntu Running 2 If it is on version 1 use this command: Windows CMD Prompt #wsl --set-default-version 2 I suggest you to reinstall Ubuntu WSL2 with these commands (be sure to backup your files beforehand): Windows CMD Prompt: #wsl --unregister Ubuntu #wsl --install --distribution Ubuntu The command "nvidia-smi" works on a fresh installation.
@aronldmanki2035
@aronldmanki2035 Жыл бұрын
​@@Archive-pg2zn I apologize for any inconvenience caused. I found the issue preventing the update of my WSL to WSL2. By enabling the "Receive updates for other Windows products" option in the advanced settings of Windows Update and performing a quick update, I was able to reinstall Ubuntu successfully. Thank you for your understanding.
@Archive-pg2zn
@Archive-pg2zn Жыл бұрын
@@aronldmanki2035 Awesome! No worries!
@noxden
@noxden Жыл бұрын
This video is very well made, thank you!
@Archive-pg2zn
@Archive-pg2zn Жыл бұрын
Thank you, too!
@tjjenkin42
@tjjenkin42 4 ай бұрын
This is an excellent tutorial. It helped me a lot. Thank you.
@lspai8367
@lspai8367 10 ай бұрын
Thanks! It really helped a lot, I really liked the compilation example. Knowing nothing about CUDA, is nice to see how it works.
@advait.
@advait. Жыл бұрын
ABSOLUTE FUCKING GIGACHAD
@Jennn
@Jennn 5 ай бұрын
Thank you so much!!!!
@bertbatac
@bertbatac 4 ай бұрын
Thank you!!! 💪💪💪
@mukhtarbimurat5106
@mukhtarbimurat5106 Жыл бұрын
thanks a lot, can you share cuda code you have used?
@Archive-pg2zn
@Archive-pg2zn Жыл бұрын
Thank you for watching the video! Of course, here is the CUDA code I have used: #include __global__ void hello() { printf("Hello, world from GPU! "); } int main() { printf("Hello, world from CPU! "); hello(); cudaDeviceSynchronize(); return(0); } Commands: nano test.cu #create file nvcc test.cu -o test #compile file ./test #run file nvprof ./test #profile performance
@tunacevik5450
@tunacevik5450 5 ай бұрын
What a man
@fabibang3941
@fabibang3941 Жыл бұрын
I thank you from the bottom of my heart sir
@briankoech4307
@briankoech4307 Жыл бұрын
The only guide that works flawlesly. Thank you for tinkering on our behalf.
@Archive-pg2zn
@Archive-pg2zn Жыл бұрын
Thank you too!
@isaiahpaul56
@isaiahpaul56 8 ай бұрын
I am crying been at for 2 days i'll just look up geniuses like you from now
@Archive-pg2zn
@Archive-pg2zn 8 ай бұрын
I'm glad it helped you!
@isaiahpaul56
@isaiahpaul56 8 ай бұрын
@@Archive-pg2zn chad
@paoda2497
@paoda2497 Жыл бұрын
Why nvcc -V print 11.5? You should install 12.1 or something that matches your cuda?
@Archive-pg2zn
@Archive-pg2zn Жыл бұрын
Thank you for your comment. This question is indeed interesting and I wondered the same. To give some general context: The version that "nvidia-smi" reports (namely 12.1) refers to a different CUDA version than the 'nvcc -V' command. "nvidia-smi" reports the CUDA version that comes with the NVIDIA driver, which is installed on the Windows operating system. "nvcc -V" shows the version installed with the "sudo apt install nvidia-cuda-toolkit" command. At 5:55, you can see that it updates nothing because the CUDA version "11.5" is already installed. Here is some further reading on the topic: stackoverflow.com/questions/53422407/different-cuda-versions-shown-by-nvcc-and-nvidia-smi This is a Stack Overflow post that provides more information about the different CUDA versions shown by the commands "nvcc -V" and "nvidia-smi". The CUDA version 11.5 seems to be the default version that was installed. I had previously installed CUDA on this machine, and this version was probably a remnant that I didn't cleanse from the machine. Though the "CUDA version 11.8" is detected correctly by Torch, which means that the environment variable is recognized. You can see that at 8:12.
@paoda2497
@paoda2497 Жыл бұрын
@@Archive-pg2zn YEah, I also tried nvcc -V and met the same case. My WSL2 also gives me cuda version 11.5, whatever I do. And I also met another problem or probably a bug, that is, if I use num_worker>0 of dataloader in pytorch, in windows it would not report error, but it cannot load the data correctly (all elements of tensor are zero. Weird! ). On the other hand, if I use num_worker>0 in its WSL2, then it would throw me a notorious error, "CUDA UNKNOWN ERROR", which brought me to your video. I thought it could be an error caused by some incorrect operations during my installation, but acoording to your reply, it seems not so easy.
@unabonger777
@unabonger777 11 ай бұрын
does it work with CUDA kit 12.2?
@Archive-pg2zn
@Archive-pg2zn 11 ай бұрын
Yes, it works exactly the same way. You need to choose 12.2 of course and specify the path with 12.2.
@blight9837
@blight9837 Жыл бұрын
*promosm*
@pilooop667
@pilooop667 Жыл бұрын
danke für das video, keine zeit mit nebensächlichkeiten verschwendet. anmerkung: wie man immer merkt das ein landsmann englisch spricht, es klingt immer so hart im gegensatz zu nativen sprechern. :D
@Archive-pg2zn
@Archive-pg2zn Жыл бұрын
Hi, danke dir vielmals!
@tuongnguyen9391
@tuongnguyen9391 Жыл бұрын
Say thank you from Vietnam !!!!
@Archive-pg2zn
@Archive-pg2zn Жыл бұрын
Thanks for watching!
@АнатолийП-я2н
@АнатолийП-я2н Жыл бұрын
I did everything right, nvcc -V good work, but nvidia-smi: Command 'nvidia-smi' not found, but can be installed with: sudo apt install nvidia-340 # version 340.108-0ubuntu5.20.04.2, or sudo apt install nvidia-utils-390 # version 390.157-0ubuntu0.20.04.1 sudo apt install nvidia-utils-450-server # version 450.248.02-0ubuntu0.20.04.1 sudo apt install nvidia-utils-470 # version 470.199.02-0ubuntu0.20.04.1 sudo apt install nvidia-utils-470-server # version 470.199.02-0ubuntu0.20.04.1 sudo apt install nvidia-utils-525 # version 525.125.06-0ubuntu0.20.04.3 sudo apt install nvidia-utils-525-server # version 525.125.06-0ubuntu0.20.04.2 sudo apt install nvidia-utils-535 # version 535.54.03-0ubuntu0.20.04.4 sudo apt install nvidia-utils-535-server # version 535.54.03-0ubuntu0.20.04.1 sudo apt install nvidia-utils-435 # version 435.21-0ubuntu7 sudo apt install nvidia-utils-440 # version 440.82+really.440.64-0ubuntu6 sudo apt install nvidia-utils-418-server # version 418.226.00-0ubuntu0.20.04.2 user1@k6:~$ echo $PATH /home/user1/.local/bin:/usr/local/cuda-11.7/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_2004.2020.424.0_x64__79rhkp1fndgsc:/mnt/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.7/bin:/mnt/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.7/libnvvp:/mnt/c/Python311/Scripts/:/mnt/c/Python311/:/mnt/c/Python37/Scripts/:/mnt/c/Python37/:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/Program Files/NVIDIA Corporation/Nsight Compute 2022.2.0/:/mnt/c/Program Files/dotnet/:/mnt/c/Users/user/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/user/.dotnet/tools:/mnt/d/my_program_files/Microsoft VS Code/bin:/snap/bin user1@k6:~$ nvcc -V nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Tue_May__3_18:49:52_PDT_2022 Cuda compilation tools, release 11.7, V11.7.64 Build cuda_11.7.r11.7/compiler.31294372_0
@yuanpengli5361
@yuanpengli5361 Жыл бұрын
Thank you!The video is very helpful!
@Archive-pg2zn
@Archive-pg2zn Жыл бұрын
Thanks!
@GXC2356
@GXC2356 Жыл бұрын
Cool video, thanks ❤
@Archive-pg2zn
@Archive-pg2zn 11 ай бұрын
Thanky you!
@deepakwalia9878
@deepakwalia9878 Жыл бұрын
great work 🙌🙌
@Archive-pg2zn
@Archive-pg2zn Жыл бұрын
Thank you!
@joxa6119
@joxa6119 11 ай бұрын
I followed your step and using Torch and its ok. But when I used Tensorflow, I got the following error 2023-10-16 11:50:10.910187: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used. 2023-10-16 11:50:10.947232: E tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:9342] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered 2023-10-16 11:50:10.947285: E tensorflow/compiler/xla/stream_executor/cuda/cuda_fft.cc:609] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered 2023-10-16 11:50:10.947314: E tensorflow/compiler/xla/stream_executor/cuda/cuda_blas.cc:1518] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered 2023-10-16 11:50:10.954375: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used. 2023-10-16 11:50:10.954639: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. 2023-10-16 11:50:11.865881: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT 2023-10-16 11:50:13.064698: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:880] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node Your kernel may have been built without NUMA support. 2023-10-16 11:50:13.106098: W tensorflow/core/common_runtime/gpu/gpu_device.cc:2211] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
@EyaBesbes-yd2gu
@EyaBesbes-yd2gu 5 ай бұрын
thank you for this tutorial. I have followed the following instructions though I don't know why I'm getting " segmentation fault ' while executing nvidia-smi: +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 550.54.10 Driver Version: 551.61 CUDA Version: 12.4 | |-----------------------------------------+------------------------+----------------------+ | 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. | |=========================================+========================+======================| Segmentation fault
@MaxZaikin
@MaxZaikin 5 ай бұрын
Hi Eya. I had the same issues. Downgrade your NVIDIA Host drivers, with the lower version of CUDA(12.1 in my case). It perfectly works for me, the problem has been solved and i;m able to rich my GPU from the PyTorch and tensorflow now.
Windows Inside of Linux
21:58
Chris Titus Tech
Рет қаралды 235 М.
The selfish The Joker was taught a lesson by Officer Rabbit. #funny #supersiblings
00:12
OYUNCAK MİKROFON İLE TRAFİK LAMBASINI DEĞİŞTİRDİ 😱
00:17
Melih Taşçı
Рет қаралды 12 МЛН
An Unknown Ending💪
00:49
ISSEI / いっせい
Рет қаралды 57 МЛН
Install WSL2 on Windows 11 with NVIDIA GPU and Docker Support
16:27
Upgrading a Soldered Laptop GPU
17:16
TechModLab
Рет қаралды 628 М.
The Unreasonable Effectiveness of Linux Workstations
12:47
No Boilerplate
Рет қаралды 617 М.
Creating a conda Environment for Pytorch and Cuda
11:50
Alex Soupir
Рет қаралды 18 М.
WSL 2: Getting started
20:34
David Bombal
Рет қаралды 714 М.
Nvidia CUDA in 100 Seconds
3:13
Fireship
Рет қаралды 1,3 МЛН
Windows Subsystem for Linux setup WSL2 Systemd, Ansible, and Kubernetes
20:50
The selfish The Joker was taught a lesson by Officer Rabbit. #funny #supersiblings
00:12