title: How to run pytorch with NVIDIA "cuda toolkit" version instead of the official conda "cudatoolkit" version?
body: <p>Some questions came up from <a href="https://superuser.com/questions/1572640/do-i-need-to-install-cuda-separately-after-installing-the-nvidia-display-driver">https://superuser.com/questions/1572640/do-i-need-to-install-cuda-separately-after-installing-the-nvidia-display-driver</a>. One of these questions:</p>
  <p>Does conda pytorch need a different version than the official non-conda / non-pip cuda toolkit at <a href="https://developer.nvidia.com/cuda-toolkit" rel="nofollow noreferrer">https://developer.nvidia.com/cuda-toolkit</a>?</p>
  <p>In other words: Can I use the NVIDIA &quot;cuda toolkit&quot; for a pytorch installation?</p>
  <p>Context:</p>
  <p>If you go through the &quot;command helper&quot; at <a href="https://pytorch.org/get-started/locally/" rel="nofollow noreferrer">https://pytorch.org/get-started/locally/</a>, you can choose between cuda versions 9.2, 10.1, 10.2 and None.</p>
  <p>Taking 10.2 can result in:</p>
  <pre><code>conda install pytorch torchvision cudatoolkit=10.2 -c pytorch
  </code></pre>
  <p>Taking &quot;None&quot; builds the following command, but then you also cannot use cuda in pytorch:</p>
  <pre><code>conda install pytorch torchvision cpuonly -c pytorch
  </code></pre>
  <p>Could I then use NVIDIA &quot;cuda toolkit&quot; version 10.2 as the conda cudatoolkit in order to make this command the same as if it was executed with <code>cudatoolkit=10.2</code> parameter?</p>
  <p>The question arose since pytorch installs a different version (10.2 instead of the most recent NVIDIA 11.0), and the conda install takes additional 325 MB. If both versions were 11.0 and the installation size was smaller, you might not even notice the possible difference. But now it is clear that conda carries its own cuda version which is independent from the NVIDIA one.</p>