title: Nvidia Jetson Nano with docker
body: <p>I am running a custom Yocto image on the Nvidia Jetson Nano that has docker-ce (v19.03.2) included. I am able to run docker without problems.</p>
  
  <p>The problem comes when I want to use docker for vision testing. I need access to host side CUDA and tensorRT. This is accessed through the Nvidia Container Runtime on top of the docker-ce. I have installed Nvidia Container Runtime (v0.9.0 beta) manually (extracted the necessary .deb packages and copy pasted them into the rootfs) to test on my build, and it seems to be working fine. </p>
  
  <p>When I run <code>docker info</code> I can see that the <code>nvidia</code> runtime is available, and it doesn't complain when I run a docker with <code>docker run -it --runtime=nvidia image</code>. </p>
  
  <p>If i run deviceQuery test <em>OUTSIDE</em> docker, i get the following:</p>
  
  <pre><code>$ /usr/bin/cuda-samples/deviceQuery
  ...
  CUDA Driver Version / Runtime Version          10.0 / 10.0
  CUDA Capability Major/Minor version number:    5.3
  ...
  deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 10.0, CUDA Runtime Version = 10.0, NumDevs = 1
  Result = PASS
  </code></pre>
  
  <p>However, when I want to run <code>deviceQuery</code> <em>IN</em> a docker to test CUDA availability, it fails:</p>
  
  <pre><code>./deviceQuery Starting...
  
   CUDA Device Query (Runtime API) version (CUDART static linking)
  
  cudaGetDeviceCount returned 35
  -&gt; CUDA driver version is insufficient for CUDA runtime version
  Result = FAIL
  </code></pre>
  
  <p>Where the Dockerfile is as follows:</p>
  
  <pre><code>FROM nvcr.io/nvidia/l4t-base:r32.2
  
  COPY ./deviceQuery /tmp/deviceQuery
  
  WORKDIR /tmp/
  
  CMD ["./deviceQuery"]
  </code></pre>
  
  <p>So my questions are these:</p>
  
  <p>Why does the deviceQuery test fail inside the docker even though I have Nvidia Container Runtime installed with docker? - and how can i fix it this issue?</p>
  
  <p>------------EDIT:----------</p>
  
  <p>More on this on <a href="https://devtalk.nvidia.com/default/topic/1070320/cuda-setup-and-installation/nvidia-container-runtime-on-jetson-nano-using-yocto/post/5422425/#5422425" rel="nofollow noreferrer">this thread</a> from nvidia devtalk.</p>