Solvednvidia docker Error on "docker run --runtime=nvidia --rm nvidia/cuda:9.0-base nvidia-smi"

Hi all,

when i try to run the command "docker run --runtime=nvidia --rm nvidia/cuda:9.0-base nvidia-smi" the terminal returns me this error:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused "process_linux.go:385: running prestart hook 1 caused \"error running hook: exit status 1, stdout: , stderr: exec command: [/usr/bin/nvidia-container-cli --load-kmods configure --ldconfig=@/sbin/ldconfig.real --device=all --compute --utility --require=cuda>=9.0 --pid=11971 /var/lib/docker/overlay2/a8588e5d4ca0512d16f45c7052fdfe1743dbdef5fedde53cc1f203a7e27cf0e5/merged]\\nnvidia-container-cli: initialization error: cuda error: unknown error\\n\""": unknown.

can someone help me?

15 Answers

✔️Accepted Answer

@flx42 I'm on debian and 384.130 is actually the latest driver in stable. So I assume installing nvidia-cuda-toolkit configured/installed something which installing nvidia-driver didn't.

I was under the impression that nvidia-docker only required the driver, is this not the case and is cuda also a requirement?

Also

docker run --runtime=nvidia --rm nvidia/cuda:9.0-base nvidia-smi

Works but

docker run --runtime=nvidia --rm nvidia/cuda:10.0-base nvidia-smi

fails with error:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused "process_linux.go:385: running prestart hook 1 caused \"error running hook: exit status 1, stdout: , stderr: exec command: [/usr/bin/nvidia-container-cli --load-kmods configure --ldconfig=@/sbin/ldconfig --device=all --compute --utility --require=cuda>=10.0 brand=tesla,driver>=384,driver<385 --pid=17572 /var/lib/docker/overlay2/b4508708670996864e64537509eb72b415785509d44788d1d8d9eb9ac1a82e3d/merged]\\nnvidia-container-cli: requirement error: unsatisfied condition: brand = tesla\\n\""": unknown.

Which seems to imply that you need a tesla card, I have a 1080 GTX Ti? (Also the require has driver>=384,driver<385?)

Are these requirements relating to the host or the container? i.e. do you need CUDA 10 installed on the host machine to run nvidia/cuda:10.0-base

Other Answers:

hi everyone!

i solved that error

docker run --runtime=nvidia --rm nvidia/cuda:9.0-base nvidia-smi

error is because librarys dont connect to right place
there's two ways to fix that:

  1. docker run --runtime=nvidia --rm nvidia/cuda:9.0-base bash
    inside container write: ldconfig
    then for check that is all ok write nvidia-smi
    then in another console write: docker ps and find your container
    then save them to disk: docker commit c3f279d17e0a newname/newname:fixed
    instead of c3f279d17e0a write container id from docker ps
    thats all

  2. docker run --runtime=nvidia --rm nvidia/cuda:9.0-base ldconfig ;nvidia-smi ____________________________________________^^^^^^^^^^ ldconfig; nvidia-smi

thats all

More Issues: