Where cuda install in docker which I pull from docker hub

seanshum: <p>I pulled pytorch/pytorch:1.1.0-cuda10.0-cudnn7.5-runtime from dockerhub, I want to find where cuda install, it did not install /usr/local, I tried</p>
<pre><code class="lang-auto">find / -type d -name nvcc
</code></pre>
<p>and there is no output,<br>
I also try</p>
<pre><code class="lang-auto">find / -type d -name cuda
</code></pre>
<p>there are some libs in python<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/2X/0/0d5a06a36ec41337534ea788b2dd4a0fca2f756e.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/0d5a06a36ec41337534ea788b2dd4a0fca2f756e" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/2X/0/0d5a06a36ec41337534ea788b2dd4a0fca2f756e_2_690x123.jpeg" alt="image" data-base62-sha1="1U75nB4ubnpkN7qpPjdb6NRYlwa" width="690" height="123" srcset="https://discuss.pytorch.org/uploads/default/optimized/2X/0/0d5a06a36ec41337534ea788b2dd4a0fca2f756e_2_690x123.jpeg, https://discuss.pytorch.org/uploads/default/optimized/2X/0/0d5a06a36ec41337534ea788b2dd4a0fca2f756e_2_1035x184.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/optimized/2X/0/0d5a06a36ec41337534ea788b2dd4a0fca2f756e_2_1380x246.jpeg 2x" data-dominant-color="16313C"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">2160×386 237 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

ptrblck: <p>Could you try to check the path using:</p>
<pre><code class="lang-auto">which nvcc
</code></pre>

seanshum: <p>I tried,<br>
it shows nvcc not found.<br>
but I used</p>
<pre><code class="lang-auto">torch.version.cuda
</code></pre>
<p>it shows ‘10.0.130’,<br>
And I run</p>
<pre><code class="lang-auto">nvidia-smi
</code></pre>
<p>it shows cuda version is 10.1</p>

ptrblck: <p>It looks like <code>nvcc</code> isn’t installed in the PyTorch docker image.<br>
Could you try to pull the NVIDIA PyTorch docker container instead:</p>
<pre><code class="lang-auto">nvidia-docker run --rm -ti --ipc=host nvcr.io/nvidia/pytorch:19.05-py3
</code></pre>
<p>, which comes with CUDA10.1.</p>
<p>Let me know, if that would work for you.</p>

ptrblck: <p><a class="mention" href="/u/ngimel">@ngimel</a> just explained, that you are using a runtime container, which does not come with <code>nvcc</code>. Instead you could pull a <code>devel</code> container using:</p>
<pre><code class="lang-auto">pytorch/pytorch:nightly-devel-cuda10.0-cudnn7
</code></pre>
<p>Could you try that?</p>

seanshum: <p>nightly-devel-cuda10.0-cudnn7 version works, I found cuda-10.0 under /usr/local/ and nvcc installed in this version.<br>
thank you very much.<br>
but I am still confused where the cuda is installed in the pytorch/pytorch:1.1.0-cuda10.0-cudnn7.5-runtime, because</p>
<pre><code class="lang-auto">torch.version.cuda
</code></pre>
<p>tells me it has cuda10 but I can’t find it</p>

ptrblck: <p>In this container only the runtime is installed (without the compiler), similar to what you would get if you just install the PyTorch binaries with CUDA libs included.<br>
While PyTorch will be able to run on you GPU, you won’t have the whole CUDA libs installed and cannot use <code>nvcc</code> out of the box.</p>

seanshum: <p>got it, thank you very much!!!</p>