RuntimeError: Found no NVIDIA driver on your system. When i build Dockerfile

username: Sergey_Zavodnov
cooked: <p>First I had a problem with installing NeMo in my Dockerfile. After a little experimentation, I was able to install it. But a new problem has appeared in that Pytorch does not see my GPU’s (they definitely exist and work properly). I’m using the base image pytorch/pytorch:1.11.0-cuda11.3-cudnn8-runtime. This is the only image I can use. I’m guessing the problem is due to version incompatibility. Is there any solution to this problem?</p>
<p>Dockerfile example:</p>
<pre><code class="lang-auto">FROM pytorch/pytorch:1.11.0-cuda11.3-cudnn8-runtime

WORKDIR /app

ARG TIMEZONE=UTC
RUN apt update &amp;&amp; apt install tzdata -y
ENV TZ="America/New_York"

RUN apt-get update &amp;&amp; \
    apt-get install -y git &amp;&amp; \
    apt-get install -y python3.10 &amp;&amp; \
    apt-get -y install curl &amp;&amp; \
    apt-get install -y wget &amp;&amp; \
    apt-get install -y libsndfile1 ffmpeg &amp;&amp; \
    apt-get install --no-install-recommends --yes build-essential &amp;&amp; \
    apt-get install -y module-init-tools

ARG nvidia_binary_version="470.223.02" # there i try other versions
ARG nvidia_binary="NVIDIA-Linux-x86_64-${nvidia_binary_version}.run"
RUN wget -q https://us.download.nvidia.com/XFree86/Linux-x86_64/${nvidia_binary_version}/${nvidia_binary} &amp;&amp; chmod +x ${nvidia_binary} &amp;&amp;./${nvidia_binary} --accept-license --ui=none --no-kernel-module --no-questions &amp;&amp;rm -rf ${nvidia_binary}

RUN pip install --upgrade pip
ADD requirements.txt requirements.txt
RUN pip install -r requirements.txt

RUN pip install Cython 
RUN pip install nemo_toolkit['all']

# Install fasttext (assuming it requires building)
RUN git clone https://github.com/facebookresearch/fastText.git &amp;&amp; \
    cd fastText &amp;&amp; \
    pip install .

ADD . .

ADD download.py . 
RUN python3 download.py # there i get error 

EXPOSE 8000

CMD python3 -u app.py
</code></pre>
<p>download.py:</p>
<pre><code class="lang-auto">from service_utils import *
from panns_inference import AudioTagging

checkpoints_asr_model = 'checkpoints/stt_en_conformer_transducer_xxlarge.nemo'
checkpoints_text_PC_model = 'checkpoints/punctuation_en_bert.nemo'


def download_model():
    denoiser = get_model_master64('https://dl.fbaipublicfiles.com/adiyoss/denoiser/master64-8a5dfb4bb92753dd.th', pretrained=True)
    denoiser = denoiser.to('cuda')
    at = AudioTagging(checkpoint_path='checkpoints/ASC.pth', device='cuda')

if __name__ == "__main__":
    download_model()
</code></pre>
<p>nvidia-smi:</p>
<pre data-code-wrap="+-----------------------------------------------------------------------------+"><code class="lang-+-----------------------------------------------------------------------------+">| NVIDIA-SMI 515.48.07    Driver Version: 515.48.07    CUDA Version: 11.7     |
|-------------------------------+----------------------+----------------------+
| 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  NVIDIA RTX A4000    On   | 00000000:01:00.0 Off |                  Off |
| 41%   37C    P8    13W / 140W |  12719MiB / 16376MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   1  NVIDIA RTX A5000    On   | 00000000:02:00.0 Off |                  Off |
| 30%   27C    P8    15W / 230W |   7017MiB / 24564MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   2  NVIDIA RTX A4000    On   | 00000000:2D:00.0 Off |                  Off |
| 41%   36C    P8    14W / 140W |      2MiB / 16376MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   3  NVIDIA RTX A4000    On   | 00000000:41:00.0 Off |                  Off |
| 69%   87C    P2   138W / 140W |  15517MiB / 16376MiB |     97%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   4  NVIDIA RTX A4000    On   | 00000000:42:00.0 Off |                  Off |
| 41%   33C    P8    16W / 140W |   2688MiB / 16376MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   5  NVIDIA RTX A4000    On   | 00000000:61:00.0 Off |                  Off |
| 41%   35C    P8    16W / 140W |  13554MiB / 16376MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   6  NVIDIA RTX A4000    On   | 00000000:62:00.0 Off |                  Off |
| 41%   40C    P8    17W / 140W |  11906MiB / 16376MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
</code></pre>
<p>Thanks!</p>

username: ptrblck
cooked: <aside class="quote no-group" data-username="Sergey_Zavodnov" data-post="1" data-topic="193706">
<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/sergey_zavodnov/48/61376_2.png" class="avatar"> Sergey_Zavodnov:</div>
<blockquote>
<p>I’m guessing the problem is due to version incompatibility.</p>
</blockquote>
</aside>
<p>Incompatibility between what?</p>
<p>Based on your Dockerfile it seems you are trying to install a driver inside the container which won’t work as you need it on bare metal.</p>