NVIDIA GeForce RTX 3060 with CUDA capability sm_86 is not compatible with the current PyTorch installation

vfbsilva: <p>I would like to have sm_86 system wide enabled. In python outside conda:</p>
<pre><code class="lang-auto">python -c "import torch; print(torch.__version__); print(torch.cuda.get_arch_list())"
1.12.0
[]
</code></pre>
<p>In conda(base):</p>
<pre><code class="lang-auto">python -c "import torch; print(torch.__version__); print(torch.cuda.get_arch_list())"
1.12.0
['sm_37', 'sm_50', 'sm_60', 'sm_61', 'sm_70', 'sm_75', 'sm_80', 'sm_86', 'compute_37']
</code></pre>
<p>So I understand from what Ive researched the issue is the torch which comes with the cuda binaries right? So I need to build it from source.</p>
<p>So I tried:</p>
<pre><code class="lang-auto"> pip3 install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cu116
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/nightly/cu116
Requirement already satisfied: torch in /usr/lib/python3.10/site-packages (1.12.0)
Requirement already satisfied: torchvision in /home/vfbsilva/.local/lib/python3.10/site-packages (0.13.0)
Collecting torchaudio
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220724%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 5.2 MB/s eta 0:00:00
Requirement already satisfied: typing_extensions in /usr/lib/python3.10/site-packages (from torch) (4.2.0)
Requirement already satisfied: numpy in /usr/lib/python3.10/site-packages (from torchvision) (1.23.0)
Requirement already satisfied: requests in /usr/lib/python3.10/site-packages (from torchvision) (2.27.1)
Requirement already satisfied: pillow!=8.3.*,&gt;=5.3.0 in /usr/lib/python3.10/site-packages (from torchvision) (9.2.0)
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220723%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.6 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220722%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.1 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220721%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.7 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220720%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.7 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220719%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.4 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220718%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.7 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220717%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.7 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220716%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.7 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220715%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.5 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220714%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 5.3 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220713%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 5.3 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220712%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.5 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220711%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 5.4 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220710%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 5.0 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220709%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.4 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220708%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.7 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220707%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 5.3 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220706%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 5.1 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220705%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.5 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220704%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 5.3 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220703%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.4 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220702%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 5.0 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220701%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.6 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220630%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.6 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220629%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.8 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220628%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.6 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220627%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.1 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220626%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.3 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220625%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.6 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220624%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.5 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220623%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 5.4 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220622%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.6 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220621%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 5.2 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220620%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.5 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220619%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.6 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220618%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.6 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220617%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.4 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220616%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.6 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220615%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.5 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220613%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.4 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220612%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.6 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220611%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.5 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220610%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 5.4 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220609%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.6 MB/s eta 0:00:00
  Downloading https://download.pytorch.org/whl/nightly/cu116/torchaudio-0.13.0.dev20220608%2Bcu116-cp310-cp310-linux_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.7 MB/s eta 0:00:00
  Downloading torchaudio-0.12.0-cp310-cp310-manylinux1_x86_64.whl (3.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.7/3.7 MB 2.8 MB/s eta 0:00:00
Requirement already satisfied: chardet&gt;=3.0.2 in /usr/lib/python3.10/site-packages (from requests-&gt;torchvision) (4.0.0)
Requirement already satisfied: idna&gt;=2.5 in /usr/lib/python3.10/site-packages (from requests-&gt;torchvision) (3.3)
Requirement already satisfied: urllib3&gt;=1.21.1 in /usr/lib/python3.10/site-packages (from requests-&gt;torchvision) (1.26.9)
Installing collected packages: torchaudio
Successfully installed torchaudio-0.12.0
vfbsilva@rohan ~/Source/vcdoc_oo/vcdoc/inferencia/mvp/application $ python -c "import torch; print(torch.__version__); print(torch.cuda.get_arch_list())"1.12.0
[]
</code></pre>
<p>So now I’m a bit confuse, cause looking at: <a href="https://github.com/pytorch/pytorch#from-source" class="inline-onebox" rel="noopener nofollow ugc">GitHub - pytorch/pytorch: Tensors and Dynamic neural networks in Python with strong GPU acceleration</a></p>
<p>It reports to use the conda environment to build it. But my conda env is oki. What should I do?</p>

ptrblck: <aside class="quote no-group" data-username="vfbsilva" data-post="1" data-topic="157385">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/vfbsilva/48/51740_2.png" class="avatar"> vfbsilva:</div>
<blockquote>
<p>So I need to build it from source.</p>
</blockquote>
</aside>
<p>No, you don’t need to build PyTorch from source and would only need to install the right PyTorch binary with a CUDA 11.x runtime for your RTX 3060.</p>
<p>Based on your outputs you have multiple PyTorch binaries installed. The one in <code>conda (base)</code> is shipping with the right compute capabilities for your GPU, the other in in the default Python environment seems to be a CPU-only binary.</p>
<p>Your install command for the nightly binaries is not installing <code>torch</code> as <code>pip</code> already finds a package:</p>
<pre><code class="lang-auto">Requirement already satisfied: torch in /usr/lib/python3.10/site-packages (1.12.0)
</code></pre>
<p>Either uninstall all PyTorch binaries via <code>pip uninstall torch</code> and <code>conda uninstall pytorch</code> (run it a few times until no package can be found) or create a new and clean virtual environment and install the right binaries there.</p>

vfbsilva: <p>Why do I need to clear the torch in conda? I want to have it only in pip so I need to uninstall it on pip and install again? is it right?</p>

smth: <p>there’s a <code>pip</code> available in <code>conda</code> too. So, ptrblck’s suggestion shows you how to clear out all pytorch installs and reinstall as he suggests, i.e. the CUDA 11 based pytorch binaries.</p>

vfbsilva: <p>Doing it:</p>
<pre><code class="lang-auto">
pip3 install torch torchvision torchaudio --extra-index-url htt
ps://download.pytorch.org/whl/cu116
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu11
6
Collecting torch
Downloading https://download.pytorch.org/whl/cu116/torch-1.12.0%2Bcu116-cp310-cp
310-linux_x86_64.whl (1904.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.9/1.9 GB 1.4 MB/s eta 0:00:00
Requirement already satisfied: torchvision in ./.local/lib/python3.10/site-package
s (0.13.0)
Requirement already satisfied: torchaudio in ./.local/lib/python3.10/site-packages
(0.12.0)
Requirement already satisfied: typing-extensions in /usr/lib/python3.10/site-packa
ges (from torch) (4.2.0)
Requirement already satisfied: numpy in /usr/lib/python3.10/site-packages (from to
rchvision) (1.23.0)
Requirement already satisfied: requests in /usr/lib/python3.10/site-packages (from
torchvision) (2.27.1)
Requirement already satisfied: pillow!=8.3.*,&gt;=5.3.0 in /usr/lib/python3.10/site-p
ackages (from torchvision) (9.2.0)
Requirement already satisfied: chardet&gt;=3.0.2 in /usr/lib/python3.10/site-packages
(from requests-&gt;torchvision) (4.0.0)
Requirement already satisfied: idna&gt;=2.5 in /usr/lib/python3.10/site-packages (fro
m requests-&gt;torchvision) (3.3)
Requirement already satisfied: urllib3&gt;=1.21.1 in /usr/lib/python3.10/site-package
s (from requests-&gt;torchvision) (1.26.9)
Installing collected packages: torch
Successfully installed torch-1.12.0+cu116
</code></pre>
<pre><code class="lang-auto">(base) vfbsilva@rohan ~ $ python -c "import torch; print(torch.__version__); print(torch.cuda.get_arch_list())"
1.13.0.dev20220724+cu116
['sm_37', 'sm_50', 'sm_60', 'sm_70', 'sm_75', 'sm_80', 'sm_86']
(base) vfbsilva@rohan ~ $ conda deactivate
vfbsilva@rohan ~ $ python -c "import torch; print(torch.__version__); print(torch.cuda.get_arch_list())"
1.12.0+cu116
['sm_37', 'sm_50', 'sm_60', 'sm_70', 'sm_75', 'sm_80', 'sm_86']

</code></pre>
<p>This seems alright.<br>
But running my docker app still results in errors:</p>
<pre><code class="lang-auto">docker run -it --gpus '"device=0"' --name teste_vcdoc_minha_gpu --rm -p 8081:8081 teste_vcdoc_minhagpu
/opt/python/venv/lib/python3.7/site-packages/torchvision/models/_utils.py:253: UserWarning: Accessing the model URLs via the internal dictionary of the module is deprecated since 0.13 and will be removed in 0.15. Please access them via the appropriate Weights Enum instead.
  "Accessing the model URLs via the internal dictionary of the module is deprecated since 0.13 and will "
/opt/python/venv/lib/python3.7/site-packages/torchvision/models/_utils.py:209: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and will be removed in 0.15, please use 'weights' instead.
  f"The parameter '{pretrained_param}' is deprecated since 0.13 and will be removed in 0.15, "
/opt/python/venv/lib/python3.7/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and will be removed in 0.15. The current behavior is equivalent to passing `weights=None`.
  warnings.warn(msg)
/opt/python/venv/lib/python3.7/site-packages/torch/cuda/__init__.py:146: UserWarning: 
NVIDIA GeForce RTX 3060 with CUDA capability sm_86 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70.
If you want to use the NVIDIA GeForce RTX 3060 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

  warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(arch_list), device_name))
^CTraceback (most recent call last):
  File "/opt/python/venv/lib/python3.7/site-packages/torch/nn/modules/rnn.py", line 179, in flatten_parameters
    self.batch_first, bool(self.bidirectional))
RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "darknet_server/vcdoc_server.py", line 513, in &lt;module&gt;
    main()
  File "darknet_server/vcdoc_server.py", line 438, in main
    vc_doc_functions.inicializa_variaveis_globais(path_prog)
  File "/opt/python/app/darknet_server/vc_doc_functions.py", line 295, in inicializa_variaveis_globais
    vc_ocr.inicializa_easyocr(path_prog)
  File "/opt/python/app/darknet_server/vc_ocr.py", line 206, in inicializa_easyocr
    READER_EASYOCR = EASY.Reader(['en','pt','es','it'],gpu=True)
  File "/opt/python/venv/lib/python3.7/site-packages/easyocr/easyocr.py", line 241, in __init__
    dict_list, model_path, device = self.device, quantize=quantize)
  File "/opt/python/venv/lib/python3.7/site-packages/easyocr/recognition.py", line 181, in get_recognizer
    model = torch.nn.DataParallel(model).to(device)
  File "/opt/python/venv/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 145, in __init__
    self.module.to(self.src_device_obj)
  File "/opt/python/venv/lib/python3.7/site-packages/torch/nn/modules/module.py", line 927, in to
    return self._apply(convert)
  File "/opt/python/venv/lib/python3.7/site-packages/torch/nn/modules/module.py", line 579, in _apply
    module._apply(fn)
  File "/opt/python/venv/lib/python3.7/site-packages/torch/nn/modules/module.py", line 579, in _apply
    module._apply(fn)
  File "/opt/python/venv/lib/python3.7/site-packages/torch/nn/modules/module.py", line 579, in _apply
    module._apply(fn)
  File "/opt/python/venv/lib/python3.7/site-packages/torch/nn/modules/rnn.py", line 189, in _apply
    self.flatten_parameters()
  File "/opt/python/venv/lib/python3.7/site-packages/torch/nn/modules/rnn.py", line 179, in flatten_parameters
    self.batch_first, bool(self.bidirectional))
KeyboardInterrupt
</code></pre>
<p>Am I oki? Now I need to rebuild that docker image with the same wheels right?</p>

ptrblck: <p>In this case your docker container image <code>teste_vcdoc_minhagpu</code> does not have the right Python binary installed or built. I don’t know if you expect to see a PyTorch source build inside this docker container but in any case you would either need to rebuild it for the right GPU arcitecture (sm_86 in your case) or install the pip wheels in the same way as in your local environment (i.e. outside of the container).</p>

vfbsilva: <p>English is not my mother language so sorry if I do miss interpret you. But you mentioned I need to install the pip wheels outside the container thats is what I did in both environments and calling it from the python install that presented the right capabilities resulted in the last error I posted.</p>
<p>So now I’m installing those wheels inside the container. I still have difficulty to grasp this compatibility layer.</p>

ptrblck: <p>In your first post you didn’t mention that you are using a docker container so I assumed you want to execute your Python script locally.<br>
Note that a docker container is isolating the environment so none of your locally installed applications should be visible inside the container and vice versa.<br>
So if you want to execute PyTorch inside a container you would have to install the right binaries there as well.</p>

vfbsilva: <p>I’m aware that I didn´t mention. The problem was two fold:</p>
<ul>
<li>first I had messed all my environments before as you well pointed out and helped me to fix. <img src="https://discuss.pytorch.org/images/emoji/apple/white_check_mark.png?v=12" title=":white_check_mark:" class="emoji" alt=":white_check_mark:" loading="lazy" width="20" height="20">
</li>
<li>second I need to add the well files to the container. <img src="https://discuss.pytorch.org/images/emoji/apple/stop_sign.png?v=12" title=":stop_sign:" class="emoji" alt=":stop_sign:" loading="lazy" width="20" height="20">
</li>
</ul>
<p>First part is oki. To achieve the second part from what I’ve read <a href="https://stackoverflow.com/questions/2477117/pip-requirements-txt-with-alternative-index" rel="noopener nofollow ugc">here</a>. I need to add:</p>
<pre><code class="lang-auto">-i https://download.pytorch.org/whl/cu116
 torch==1.12.0+cu116
 torchvision==0.2.1
 torchaudio
</code></pre>
<p>To requirements.txt</p>