I build a docker container FROM nvidia/cuda:8.0-devel-ubuntu16.04 in my Dockerfile to have the CUDA Toolkit installed.My architecture is the one depicted in the official nvidia-docker repoAfter the build and run I get$ nvidia-smibash: nvidia-smi: command not foundI have a DOCKER_HOST that points to the running Docker Nvidia container (the GPUs machine) likeexport DOCKER_HOST=tcp://x.x.x.x:2376export DOCKER_TLS_VERIFY=1set NVIDIA_VER=367.57and the I connect to the docker instance binding the ports when doing the tunnel to the machine:$ ssh -i $DOCKER_CERT docker@$IP -g -R 10250:localhost:10250 -L 0.0.0.0:3000:127.0.0.1:3000  -L 0.0.0.0:8181:127.0.0.1:8181 -L 5858:127.0.0.1:5858 -L 4567:127.0.0.1:4567My docker instance is started as usual$ docker run --rm -it --name $CONTAINER_NAME -p 3000:3000 $CONTAINER_IMG:$CONTAINER_VERSION $CMDI can connect to the docker nvidia instance from the docker host:loreto@nvidia-docker:~$ sudo nvidia-docker run --rm nvidia/cuda nvidia-smiFri Mar 17 09:08:03 2017       +-----------------------------------------------------------------------------+| NVIDIA-SMI 367.57                 Driver Version: 367.57                    ||-------------------------------+----------------------+----------------------+| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC || Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. ||===============================+======================+======================||   0  GRID K520           Off  | 0000:00:03.0     Off |                  N/A || N/A   35C    P8    17W / 125W |      0MiB /  4036MiB |      0%      Default |+-------------------------------+----------------------+----------------------++-----------------------------------------------------------------------------+| Processes:                                                       GPU Memory ||  GPU       PID  Type  Process name                               Usage      ||=============================================================================||  No running processes found                                                 |+-----------------------------------------------------------------------------+and evenloreto@nvidia-docker:~$ nvidia-smiFri Mar 17 09:12:59 2017       +-----------------------------------------------------------------------------+| NVIDIA-SMI 367.57                 Driver Version: 367.57                    ||-------------------------------+----------------------+----------------------+| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC || Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. ||===============================+======================+======================||   0  GRID K520           Off  | 0000:00:03.0     Off |                  N/A || N/A   35C    P8    17W / 125W |      0MiB /  4036MiB |      0%      Default |+-------------------------------+----------------------+----------------------++-----------------------------------------------------------------------------+| Processes:                                                       GPU Memory ||  GPU       PID  Type  Process name                               Usage      ||=============================================================================||  No running processes found                                                 |while from my container $CONTAINER_NAME when running I cannot see it$ docker exec -it $CONTAINER_NAME bash$ nvidia-sminvidia-smi: command not foundThe  $CONTAINER_NAME was built FROM nvidia/cuda:8.0-devel-ubuntu16.04I have asked this question as issue to nvidia-docker github repo here.[UPDATE]I have solved the issue, attaching the devices and setting the driver on the container when running it like:docker run --rm -it --device=/dev/nvidiactl --device=/dev/nvidia-uvm --device=/dev/nvidia0 -v nvidia_driver_367.57:/usr/local/nvidia:ro --name $CONTAINER_NAME -p 3000:3000 $CONTAINER_IMG:$CONTAINER_VERSION $CMDOf course the DOCKER_HOST must be set and the tunnel must be open.
Nvidia Docker: nvidia-smi: command not found Ask Question
nvidia;docker