我是Docker的新手,因此以下问题可能有点天真,但我遇到了麻烦,需要帮助。
我正在尝试重现一些研究成果。作者只是released code along with a specification of how to build a Docker image来重现他们的结果。相关位复制如下:
我相信我正确安装了Docker:
$ docker --version
Docker version 19.03.13, build 4484c46d9d
$ sudo docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
但是,当我尝试检查我的nvidia-docker
安装是否成功时,出现以下错误:
$ sudo docker run --gpus all --rm nvidia/cuda:10.1-base nvidia-smi
docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"process_linux.go:432: running prestart hook 0 caused \\\"error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: initialization error: nvml error: driver not loaded\\\\n\\\"\"": unknown.
看起来关键错误是:
nvidia-container-cli: initialization error: nvml error: driver not loaded
我本地没有GPU,我发现有关在NVIDIA Docker之前是否需要安装CUDA的矛盾信息。例如,this NVIDIA moderator says“正确的nvidia docker插件安装始于在基础计算机上的正确CUDA安装。”
我的问题如下:
是否可以在未安装CUDA的情况下安装NVIDIA Docker?
如果是,此错误的根源是什么,我该如何解决?
如果没有,如何创建该Docker映像以重现结果?
答案 0 :(得分:0)
nvidia-docker
仅需要安装NVIDIA GPU驱动程序和Docker引擎:https://github.com/NVIDIA/nvidia-docker#getting-started。对于许多人(包括我)来说,安装nvidia-docker
的唯一目的是能够避免与CUDA接触:)。