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

nvidia-docker: command not found #1028

Closed
ChaooMa opened this issue Jul 26, 2019 · 15 comments
Closed

nvidia-docker: command not found #1028

ChaooMa opened this issue Jul 26, 2019 · 15 comments

Comments

@ChaooMa
Copy link

ChaooMa commented Jul 26, 2019

Have done all the command:

Add the package repositories

$ distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
$ curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
$ curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee > > /etc/apt/sources.list.d/nvidia-docker.list

$ sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit
$ sudo systemctl restart docker

And then, do:

nvidia-docker

Get an Error:

nvidia-docker: command not found

Thanks.

@scaleoutsean
Copy link

How is that an issue?

@RenaudWasTaken
Copy link
Contributor

RenaudWasTaken commented Jul 26, 2019

Hello!
This is the expected behavior and is documented in the README.

Please install the Legacy packages (nvidia-docker2) if you want the nvidia-docker cli.

@hygxy
Copy link

hygxy commented Aug 12, 2019

@RenaudWasTaken Hi, do you mean the following command in README:

  • $ sudo apt-get update
  • $ sudo apt-get --only-upgrade install docker-ce nvidia-docker2
  • $ sudo systemctl restart docker

After that I still get this error:

  • nvidia-docker: command not found

Any suggestions?

@PiseyYou
Copy link

same issue, after rundocker run --gpus '"device=0"' nvidia/cuda:9.0-base nvidia-smi sucessfully, when nvidia-docker, it show command not found, have you solve these problems? @ChaooMa @hygxy

@hygxy
Copy link

hygxy commented Sep 11, 2019

@PiseyYou
I didn't solve it yet, I just turn back use to nvidia-docker instead of nvidia-docker2

@whoszus
Copy link

whoszus commented Oct 17, 2019

same issue here @PiseyYou

@zzmingxxxx
Copy link

I've encountered the same issue... :(

@annasamt
Copy link

I also get the same error: nvidia-docker: command not found, although:

  1. I have installed latest Docker version and
  2. followed the instructions from https://github.com/NVIDIA/nvidia-docker for Ubuntu 16.04 to install nvidia-docker
  3. nvidia-drivers are also installed.

Reg. above comments on nvidia-docker2, this is a deprecated version so I see no reason to use it.

Can anyone please support us on this issue?
Thanks in advance

@ccssmania
Copy link

I solved the problem running sudo apt-get install nvidia-docker2

@zzmingxxxx
Copy link

If you have chosen to install the newest nvidia enabled docker, "nvidia-container-toolkit", follow https://github.com/NVIDIA/nvidia-docker#quickstart, in order to run a docker contain instance with nvidia GPU capacity enabled, just use command like "$ docker run --gpus all nvidia/cuda:9.0-base nvidia-smi", no need use legacy "nvidia-docker" command.

@gocpplua
Copy link

I solved the problem running sudo apt-get install nvidia-docker2

E: Unable to locate package nvidia-docker2

@arkadyeye
Copy link

arkadyeye commented Aug 23, 2021

I solved the problem running sudo apt-get install nvidia-docker2

E: Unable to locate package nvidia-docker2

You should add the Keys

distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
   && curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - \
   && curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list

look at the documentation

@gocpplua
Copy link

I solved the problem running sudo apt-get install nvidia-docker2

E: Unable to locate package nvidia-docker2

You should add the Keys

distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
   && curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - \
   && curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list

look at the documentation

i will try it, thanks

@ndvbd
Copy link

ndvbd commented Dec 3, 2022

Any solutions?

@Sadwy
Copy link

Sadwy commented Feb 8, 2023

use --gpus instead of nvidia-docker
for example, replace this command:

nvidia-docker run -it -v `pwd`/../data:/dataset --shm-size 16g my-container /bin/bash

with this command:

docker run --gpus all -it -v `pwd`/../data:/dataset --shm-size 16g my-container /bin/bash

there is an another example using --gpus in wiki:

docker run --gpus device=2,3 nvidia/cuda:9.0-base nvidia-smi

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