Install WSL2 on Windows 11 with NVIDIA CUDA 11.8

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ก.ย. 2024

ความคิดเห็น • 70

  • @ParatrooperK
    @ParatrooperK ปีที่แล้ว +55

    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  ปีที่แล้ว +6

      Thanks a lot! Glad it helped you!

    • @pixelrogue
      @pixelrogue ปีที่แล้ว +5

      Man, the nvidia documentation is TRASH.

  • @IdPreferNot1
    @IdPreferNot1 9 หลายเดือนก่อน +3

    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!!

  • @carterstevenson1536
    @carterstevenson1536 10 หลายเดือนก่อน +3

    Thank you so much!! Worked over 6hrs on searching for solution until I saw your video. That's really helpful!

    • @Archive-pg2zn
      @Archive-pg2zn  10 หลายเดือนก่อน

      Great! I'm glad it worked.

  • @romayojr
    @romayojr 2 หลายเดือนก่อน +2

    amazing tutorial - this still works in 2024. thank you kindly, good sir!

    • @_fl3x_up_
      @_fl3x_up_ 2 หลายเดือนก่อน +2

      did u install with cuda 11.8 or the newer versions?

    • @user-vo1qc5np2m
      @user-vo1qc5np2m 2 หลายเดือนก่อน +1

      same question: did you use cuda toolkit 11.8 or a newer one? (e.g. 12.5)

    • @romayojr
      @romayojr หลายเดือนก่อน

      @@user-vo1qc5np2m 11.8 just like the video suggested

    • @romayojr
      @romayojr หลายเดือนก่อน

      @@_fl3x_up_ 11.8 just like the video suggested

  • @shuaishao6114
    @shuaishao6114 6 หลายเดือนก่อน +1

    appreciate your time to create this!
    managed to set up my dev environment for ML, thanks!

  • @arthura9619
    @arthura9619 ปีที่แล้ว +4

    After hours and hours trying, this saves my day, thanks

  • @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.

  • @JohananJoysingh
    @JohananJoysingh 2 หลายเดือนก่อน

    Amazing. So clear and straight forward.

  • @briankoech4307
    @briankoech4307 ปีที่แล้ว

    The only guide that works flawlesly. Thank you for tinkering on our behalf.

  • @tjjenkin42
    @tjjenkin42 3 หลายเดือนก่อน

    This is an excellent tutorial. It helped me a lot. Thank you.

  • @isaiahpaul56
    @isaiahpaul56 7 หลายเดือนก่อน

    I am crying been at for 2 days i'll just look up geniuses like you from now

    • @Archive-pg2zn
      @Archive-pg2zn  7 หลายเดือนก่อน +1

      I'm glad it helped you!

    • @isaiahpaul56
      @isaiahpaul56 7 หลายเดือนก่อน

      @@Archive-pg2zn chad

  • @philwebb59
    @philwebb59 ปีที่แล้ว +3

    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.

  • @noxden
    @noxden ปีที่แล้ว +2

    This video is very well made, thank you!

  • @fabibang3941
    @fabibang3941 ปีที่แล้ว

    I thank you from the bottom of my heart sir

  • @cavu2555
    @cavu2555 6 วันที่ผ่านมา

    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

  • @pilooop667
    @pilooop667 ปีที่แล้ว +1

    würde mich sehr über weitere Videos zu wsl2 + AI anwendung/training freuen

  • @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.

  • @esteban.marinone
    @esteban.marinone ปีที่แล้ว +1

    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.

  • @user-vo1qc5np2m
    @user-vo1qc5np2m 2 หลายเดือนก่อน

    Great video. Would this work with a newer cuda toolkit e.g. 12.5?

  • @yuanpengli5361
    @yuanpengli5361 ปีที่แล้ว

    Thank you!The video is very helpful!

  • @tuongnguyen9391
    @tuongnguyen9391 ปีที่แล้ว

    Say thank you from Vietnam !!!!

  • @eriikrasniqii7068
    @eriikrasniqii7068 4 หลายเดือนก่อน

    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?

  • @lucasborges1751
    @lucasborges1751 5 หลายเดือนก่อน

    THANK YOU! I LOVE U 🇧🇷🇧🇷🇧🇷🇧🇷🇧🇷

  • @bertbatac
    @bertbatac 3 หลายเดือนก่อน

    Thank you!!! 💪💪💪

  • @SilverCodeGuru
    @SilverCodeGuru 3 หลายเดือนก่อน

    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.

  • @shirleyyli128
    @shirleyyli128 2 หลายเดือนก่อน

    goated

  • @Jennn
    @Jennn 4 หลายเดือนก่อน

    Thank you so much!!!!

  • @Aisys-pk
    @Aisys-pk 6 หลายเดือนก่อน

    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

  • @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

  • @tunacevik5450
    @tunacevik5450 4 หลายเดือนก่อน

    What a man

  • @GXC2356
    @GXC2356 11 หลายเดือนก่อน

    Cool video, thanks ❤

  • @aronldmanki2035
    @aronldmanki2035 ปีที่แล้ว +1

    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  ปีที่แล้ว +2

      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 ปีที่แล้ว +1

      ​@@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  ปีที่แล้ว +2

      @@aronldmanki2035 Awesome! No worries!

  • @deepakwalia9878
    @deepakwalia9878 ปีที่แล้ว

    great work 🙌🙌

  • @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.

  • @mukhtarbimurat5106
    @mukhtarbimurat5106 ปีที่แล้ว +1

    thanks a lot, can you share cuda code you have used?

    • @Archive-pg2zn
      @Archive-pg2zn  ปีที่แล้ว +1

      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

  • @advait.
    @advait. ปีที่แล้ว

    ABSOLUTE FUCKING GIGACHAD

  • @unabonger777
    @unabonger777 10 หลายเดือนก่อน

    does it work with CUDA kit 12.2?

    • @Archive-pg2zn
      @Archive-pg2zn  10 หลายเดือนก่อน

      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*

  • @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.

  • @user-sq2cx6qc3y
    @user-sq2cx6qc3y ปีที่แล้ว

    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

  • @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.