hi! I installed nvidia-docker on my ubuntu 18.04 machine using docker from the docker website (docker-cc). When I try a nvidia docker image all things work:
$ docker run --runtime=nvidia nvidia/cuda nvidia-smi
Wed Jul 4 14:50:12 2018
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.48 Driver Version: 390.48 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 1080 Off | 00000000:08:00.0 On | N/A |
| 50% 58C P0 51W / 210W | 1254MiB / 8112MiB | 1% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
+-----------------------------------------------------------------------------+
But when I try to use the standard cuda bundled with Ubuntu inside the docker image things seem to be breaking. For example this docker file:
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y nvidia-utils-390
gives me problems.
$ docker build . -t test
Sending build context to Docker daemon 2.048kB
Step 1/2 : FROM ubuntu:18.04
---> 113a43faa138
Step 2/2 : RUN apt-get update && apt-get install -y nvidia-utils-390
---> Using cache
---> f68df36e2de4
Successfully built f68df36e2de4
Successfully tagged test:latest
$ docker run --runtime=nvidia test nvidia-smi
Failed to initialize NVML: Unknown Error
Also installing the full nvidia-cuda-toolkit package inside the container doesn't help. Am i missing something? can I only use the Docker files supplied by Nvidia?
See https://github.com/NVIDIA/nvidia-docker/wiki/Usage#non-cuda-image
Most helpful comment
See https://github.com/NVIDIA/nvidia-docker/wiki/Usage#non-cuda-image