Using latest instructions for latest version (changes in https://github.com/NVIDIA/nvidia-docker/commit/7f67577c89f081dfbe481a22a8d1dea61c46cde6), apt-get install cannot find the package nvidia-container-toolkit.
$ sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit
..
Hit:6 https://download.docker.com/linux/ubuntu bionic InRelease
..
Hit:8 https://nvidia.github.io/libnvidia-container/ubuntu18.04/amd64 InRelease
..
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package nvidia-container-toolkit
Using same repo but previous version (2.1.0-1 for Ubuntu) and referencing previous versions of README.md, I run sudo apt-get install -y nvidia-docker2 and install successfully. sudo docker run --runtime=nvidia --rm nvidia/cuda:9.0-base nvidia-smi also runs fine.
Follow newest instructions (on Ubuntu 18.04 or Mint): install Docker 19.03.0, add NVIDIA Docker keys and repos, update repos and run the install command.
NVIDIA repo:
$ cat nvidia-docker.list
deb https://nvidia.github.io/libnvidia-container/ubuntu18.04/$(ARCH) /
deb https://nvidia.github.io/nvidia-container-runtime/ubuntu18.04/$(ARCH) /
deb https://nvidia.github.io/nvidia-docker/ubuntu18.04/$(ARCH) /
OS:
Kernel Version: 4.15.0-54-lowlatency
Operating System: Linux Mint 19.2
OSType: linux
Architecture: x86_64
Older package installs and runs fine on the same system:
$ sudo apt-get install -y nvidia-docker2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
nvidia-container-runtime
The following NEW packages will be installed:
nvidia-container-runtime nvidia-docker2
0 upgraded, 2 newly installed, 0 to remove and 8 not upgraded.
Need to get 0 B/613 kB of archives.
After this operation, 2036 kB of additional disk space will be used.
Selecting previously unselected package nvidia-container-runtime.
(Reading database ... 406863 files and directories currently installed.)
Preparing to unpack .../nvidia-container-runtime_3.0.0-1_amd64.deb ...
Unpacking nvidia-container-runtime (3.0.0-1) ...
Selecting previously unselected package nvidia-docker2.
Preparing to unpack .../nvidia-docker2_2.1.0-1_all.deb ...
Unpacking nvidia-docker2 (2.1.0-1) ...
Setting up nvidia-container-runtime (3.0.0-1) ...
Setting up nvidia-docker2 (2.1.0-1) ...
$ nvidia-container-cli -V
version: 1.0.2
build date: 2019-03-26T03:58+00:00
build revision: ff40da533db929bf515aca59ba4c701a65a35e6b
build compiler: x86_64-linux-gnu-gcc-7 7.3.0
build platform: x86_64
build flags: -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 -DNDEBUG -std=gnu11 -O2 -g -fdata-sections -ffunction-sections -fstack-protector -fno-strict-aliasing -fvisibility=hidden -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections
$ sudo docker run --runtime=nvidia --rm nvidia/cuda:9.0-base nvidia-smi
Unable to find image 'nvidia/cuda:9.0-base' locally
9.0-base: Pulling from nvidia/cuda
35b42117c431: Pull complete
ad9c569a8d98: Pull complete
293b44f45162: Pull complete
0c175077525d: Pull complete
695112388c71: Pull complete
a911faa54767: Pull complete
ae34ac42e04c: Pull complete
Digest: sha256:429a796eb43622eb96b02e48f1ba695d6fc97b8b878b5b7df90cd0675c54f46f
Status: Downloaded newer image for nvidia/cuda:9.0-base
Tue Jul 23 03:56:38 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.39 Driver Version: 418.39 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| 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 MX150 Off | 00000000:01:00.0 Off | N/A |
| N/A 51C P0 N/A / N/A | 0MiB / 2002MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
Older version that works on my system:
nvidia-docker2:
Installed: 2.1.0-1
Candidate: 2.1.0-1
Version table:
*** 2.1.0-1 500
500 https://nvidia.github.io/nvidia-docker/ubuntu18.04/amd64 Packages
100 /var/lib/dpkg/status
I'm facing the same problem.
Fixed, sorry about that, I updated the docs a bit too early.
Could you hint what the solution is? I am still having the problem
I also have the same problem on Ubuntu 18.04, CUDA 10.2:
$sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit
......
W: Target Translations (en_GB) is configured multiple times in /etc/apt/sources.list.d/nvidia-container-runtime.list:2 and /etc/apt/sources.list.d/nvidia-docker.list:2
W: Target Translations (en) is configured multiple times in /etc/apt/sources.list.d/nvidia-container-runtime.list:2 and /etc/apt/sources.list.d/nvidia-docker.list:2
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies.
nvidia-container-toolkit : Depends: libnvidia-container-tools (>= 0.1.0) but it is not going to be installed
Depends: libnvidia-container-tools (< 2.0.0) but it is not going to be installed
nvidia-cuda-toolkit : Depends: nvidia-cuda-dev (= 9.1.85-3ubuntu1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
+1
same
same
Most helpful comment
Could you hint what the solution is? I am still having the problem