Is there a way to unite WSL2 Ubuntu, Tensorflow-GPU, CUDA, and Pycharm[windows]?

11,240

Solution 1

Now there is one. You can install a WSL 2, that has CUDA and with it TensorFlow support: https://docs.microsoft.com/de-de/windows/win32/direct3d12/gpu-cuda-in-wsl

Then you can install PyCharm and configure it to to work with WSL: https://www.jetbrains.com/help/pycharm/using-wsl-as-a-remote-interpreter.html#

Solution 2

https://docs.microsoft.com/en-us/windows/wsl/wsl2-faq

"In initial releases of WSL 2 hardware access support will be limited, e.g: you will be unable to access the GPU, serial or USB devices." However, adding better device support is high on our backlog, as this opens many more use cases for developers that wish to interact with these devices.

Share:
11,240
Vasu Srivastava
Author by

Vasu Srivastava

Updated on September 18, 2022

Comments

  • Vasu Srivastava
    Vasu Srivastava almost 2 years
    1. I have a WSL 2 Ubuntu with Anaconda 3 installed in Ubuntu WSL 2.
    2. Then I installed PyCharm in Windows 10.
    3. Then I created an environment for tensorflow-gpu in WSL2.
    4. I installed CUDA and cuDNN in Windows 10.

    Now my question is, "How to connect all of them, if at all possible?" I read that WSL 2 is pure Linux Kernal and Tensorflow is faster in Linux than Windows 10.

    • Vasu Srivastava
      Vasu Srivastava over 4 years
      My question is clear. I listed the 4 points. Based on that, I simply want to know how to connect them to run tensorflow-gpu in pycharm which is installed in Windows. Or do I have to install cuda in wsl 2?
    • Biswapriyo
      Biswapriyo over 4 years
      GPU isn't accessible in WSL. See this long issue github.com/microsoft/WSL/issues/1788
    • lol
      lol about 4 years
      OP was referring to WSL2 which runs a Linux kernel and is different from original WSL which uses syscall translation.