本文介绍了nvidia-docker:未知的运行时指定了nvidia的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在安装docker-ce之后尝试安装nvidia-docker。我遵循以下步骤:安装nvidia-码头工人它似乎已正确安装。

I tried to install the nvidia-docker after installing docker-ce. I followed this : https://github.com/NVIDIA/nvidia-docker to install nvidia-docker. It seems to have installed correctly.

我尝试运行:

$ sudo docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi
docker: Error response from daemon: Unknown runtime specified nvidia.
See 'docker run --help'.

尽管如此,这可行(没有--runtime = nvidia):

Although, this works (without --runtime=nvidia):

$ docker container run -ti ubuntu bash

我的系统上的一些其他信息:这是一个ubuntu服务器16.04,带有8个GPU(Titan Xp)和nvidia驱动程序版本387.26。我可以在主机系统上运行nvidia-smi -l 1,它可以按预期工作。

Some additional info on my system: It is an ubuntu server 16.04 with 8 GPUs (Titan Xp) and nvidia driver version 387.26. I can run nvidia-smi -l 1 on the host system and it works as expected.

$ dpkg -l | grep -E '(nvidia|docker)'
ii  docker-ce                              18.06.1~ce~3-0~ubuntu                        amd64        Docker: the open-source application container engine
ii  libnvidia-container-tools              1.0.0-1                                      amd64        NVIDIA container runtime library (command-line tools)
ii  libnvidia-container1:amd64             1.0.0-1                                      amd64        NVIDIA container runtime library
ii  nvidia-container-runtime               2.0.0+docker18.06.1-1                        amd64        NVIDIA container runtime
ii  nvidia-container-runtime-hook          1.4.0-1                                      amd64        NVIDIA container runtime hook
ii  nvidia-docker2                         2.0.3+docker18.06.1-1                        all          nvidia-docker CLI wrapper



$ cat /etc/docker/daemon.json
{
    "runtimes": {
        "nvidia": {
            "path": "nvidia-container-runtime",
            "runtimeArgs": []
        }
    }
}

我遇到过:,但我不确定该怎么做。

I have come across: https://github.com/NVIDIA/nvidia-docker/issues/501, but I am not sure how I should go about it.

推荐答案

实际上,您可以尝试通过以下命令重新启动docker daemon。

Actually, you can try to restart docker daemon by following command.

sudo systemctl daemon-reload
sudo systemctl restart docker

或者您可以尝试重新启动系统。
使nvidia-docker工作

Or you can try to reboot your system.to make nvidia-docker work

这篇关于nvidia-docker:未知的运行时指定了nvidia的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-13 14:33