Title: Windows Subsystem for Linux with CUDA support + TensorFlow<p>Let me save you many hours of pain and just give you the rundown.<p>* You <i>MUST</i> be on Windows 10 21H2 or above. 21H2 cannot currently be updated to (yeah, it&#x27;s because they are pushing Windows 11) so you need to download it as an ISO.<p>* Install the latest &quot;game ready driver&quot; for your card (you don&#x27;t need a special driver despite the nvidia documentation, I got mine here: <a href="https:&#x2F;&#x2F;www.nvidia.com&#x2F;Download&#x2F;index.aspx" rel="nofollow">https:&#x2F;&#x2F;www.nvidia.com&#x2F;Download&#x2F;index.aspx</a>).<p>* In general you should ignore the nvidia documentation as they make it almost impossible to figure out what combination of cuda &amp; cudnn versions you need.<p>Steps to install:<p>1. Open CMD as administrator.<p>2. Run: wsl --install -d ubuntu<p>3. Open the Ubuntu WSL and enter the following commands:<p># Install CUDA<p>sudo apt-key adv --fetch-keys <a href="http:&#x2F;&#x2F;developer.download.nvidia.com&#x2F;compute&#x2F;cuda&#x2F;repos&#x2F;ubuntu1804&#x2F;x86_64&#x2F;7fa2af80.pub" rel="nofollow">http:&#x2F;&#x2F;developer.download.nvidia.com&#x2F;compute&#x2F;cuda&#x2F;repos&#x2F;ubun...</a><p>sudo sh -c &#x27;echo &quot;deb <a href="http:&#x2F;&#x2F;developer.download.nvidia.com&#x2F;compute&#x2F;cuda&#x2F;repos&#x2F;ubuntu1804&#x2F;x86_64" rel="nofollow">http:&#x2F;&#x2F;developer.download.nvidia.com&#x2F;compute&#x2F;cuda&#x2F;repos&#x2F;ubun...</a> &#x2F;&quot; &gt; &#x2F;etc&#x2F;apt&#x2F;sources.list.d&#x2F;cuda.list&#x27;<p>sudo apt-get update<p>sudo apt-get --yes install cuda-toolkit-11-2 cuda-toolkit-11-2<p>sudo sh -c &#x27;echo &quot;deb <a href="http:&#x2F;&#x2F;developer.download.nvidia.com&#x2F;compute&#x2F;machine-learning&#x2F;repos&#x2F;ubuntu1804&#x2F;x86_64" rel="nofollow">http:&#x2F;&#x2F;developer.download.nvidia.com&#x2F;compute&#x2F;machine-learnin...</a> &#x2F;&quot; &gt; &#x2F;etc&#x2F;apt&#x2F;sources.list.d&#x2F;nvidia-machine-learning.list&#x27;<p>sudo apt-get update<p>sudo apt install cuda-11-2 libcudnn8 libcudnn8-dev<p>sudo apt install libnvinfer8 libnvinfer-dev libnvinfer-plugin8<p># Verify CUDA installation<p>cd &#x2F;usr&#x2F;local&#x2F;cuda-11.2&#x2F;samples&#x2F;4_Finance&#x2F;BlackScholes<p>sudo make<p>.&#x2F;BlackScholes<p># Install TensorFlow<p>sudo apt-get update &amp;&amp; sudo apt-get install python3-pip python3-dev<p>pip3 install tensorflow-gpu<p>If you are reading this in the future I have some advice:<p>* Look at this page to get at least an idea of what versions of cuda and cudnn will work together: <a href="https:&#x2F;&#x2F;www.tensorflow.org&#x2F;install&#x2F;source#gpu" rel="nofollow">https:&#x2F;&#x2F;www.tensorflow.org&#x2F;install&#x2F;source#gpu</a><p>* Use apt-cache search &lt;THING&gt; to see the possible versions, allowing you to <i>guess</i> what you need to install. Good luck.
Upvote: