Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

nvidia-docker not working with non-cuda containers #786

Closed
gijzelaerr opened this issue Jul 4, 2018 · 1 comment
Closed

nvidia-docker not working with non-cuda containers #786

gijzelaerr opened this issue Jul 4, 2018 · 1 comment

Comments

@gijzelaerr
Copy link

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?

@3XX0
Copy link
Member

3XX0 commented Jul 5, 2018

See https://github.com/NVIDIA/nvidia-docker/wiki/Usage#non-cuda-image

@3XX0 3XX0 closed this as completed Jul 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants