CUDA not available event though cuda installation is not cpuonly

ChristLBUPT: <p>I’m using cuda in a docker machine with 2 Nvidia V100 GPUs, my cuda installation is torch==1.13.1+cu117, previously this version works fine, but recently I installed this version in a new docker but <code>torch.cuda.is_available</code> is false. Here are some basic information about the machine and</p>
<p>pytorch installation status:</p>
<pre><code class="lang-auto">torch                1.13.1+cu117
torchaudio           0.13.1
torchvision          0.14.1
</code></pre>
<p>nvidia-smi result:</p>
<pre><code class="lang-auto">Fri May 19 16:01:30 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.82.01    Driver Version: 470.82.01    CUDA Version: ERR!     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Tesla V100-SXM2...  On   | 00000000:3D:00.0 Off |                    0 |
| N/A   33C    P0    41W / 300W |      0MiB / 32510MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   1  Tesla V100-SXM2...  On   | 00000000:3E:00.0 Off |                    0 |
| N/A   30C    P0    42W / 300W |      0MiB / 32510MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+
</code></pre>
<p>nvcc --version</p>
<pre><code class="lang-auto">nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130
</code></pre>
<p>Note that <code>nvidia-smi</code> shows <code>ERR!</code> for CUDA Version. Maybe it’s the root cause of this problem?</p>

CharlieKoo: <p>I think the version of torchvision and torchaudio should be <code>0.14.1+cu117</code> and <code>0.13.1+cu117</code> instead of yours.Look at my picture<br>
<img src="https://discuss.pytorch.org/uploads/default/original/3X/c/9/c982df324df5a0d482d5ca8a76b9a0ba5c39a865.png" alt="image" data-base62-sha1="sKEmwfSOPhOwlcrlMft2Q36kFql" width="545" height="319"></p>

ptrblck: <aside class="quote no-group" data-username="ChristLBUPT" data-post="1" data-topic="180291">
<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/christlbupt/48/60967_2.png" class="avatar"> ChristLBUPT:</div>
<blockquote>
<p>previously this version works fine, but recently I installed this version in a new docker but <code>torch.cuda.is_available</code> is false.</p>
</blockquote>
</aside>
<p>This sounds like a setup issue and you could compare your current setup to the older working one.</p>

ChristLBUPT: <p>I know, thanks! Through restarting the docker the problem disappeared.</p>