
WSL with CUDA support
by peatmonster on Hacker News.
Windows Subsystem for Linux with CUDA support + TensorFlow Let me save you many hours of pain and just give you the rundown. * You MUST be on Windows 10 21H2 or above. 21H2 cannot currently be updated to (yeah, it’s because they are pushing Windows 11) so you need to download it as an ISO. * Install the latest “game ready driver” for your card (you don’t need a special driver despite the nvidia documentation, I got mine here: https://ift.tt/1OtSyri). * In general you should ignore the nvidia documentation as they make it almost impossible to figure out what combination of cuda & cudnn versions you need. Steps to install: 1. Open CMD as administrator. 2. Run: wsl –install -d ubuntu 3. Open the Ubuntu WSL and enter the following commands: # Install CUDA sudo apt-key adv –fetch-keys https://ift.tt/3tT8BtV sudo sh -c ‘echo “deb https://ift.tt/3fKz3Of /” > /etc/apt/sources.list.d/cuda.list’ sudo apt-get update sudo apt-get –yes install cuda-toolkit-11-2 cuda-toolkit-11-2 sudo sh -c ‘echo “deb https://ift.tt/3rDFS9F /” > /etc/apt/sources.list.d/nvidia-machine-learning.list’ sudo apt-get update sudo apt install cuda-11-2 libcudnn8 libcudnn8-dev sudo apt install libnvinfer8 libnvinfer-dev libnvinfer-plugin8 # Verify CUDA installation cd /usr/local/cuda-11.2/samples/4_Finance/BlackScholes sudo make ./BlackScholes # Install TensorFlow sudo apt-get update && sudo apt-get install python3-pip python3-dev pip3 install tensorflow-gpu If you are reading this in the future I have some advice: * Look at this page to get at least an idea of what versions of cuda and cudnn will work together: https://ift.tt/35f68Qj * Use apt-cache search to see the possible versions, allowing you to guess what you need to install. Good luck.
