docker出现如下错误:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemo
Posted 一起来看流星雨
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了docker出现如下错误:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemo相关的知识,希望对你有一定的参考价值。
在docker中配置deepo时出现了错误:
在出现这个错误之前,我是先用如下命令查看NVIDIA-docker是否安装成功。
docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi
出现如下显示:
在网上查看原因,显示是nvidia-docker 没有注册,具体查看https://blog.csdn.net/weixin_32820767/article/details/80538510
然后按照博客提示进行注册,通过下面的步骤:
#To register the nvidia runtime, use the method below that is best suited to your environment. #You might need to merge the new argument with your existing configuration. #Systemd drop-in file
sudo mkdir -p /etc/systemd/system/docker.service.d sudo tee /etc/systemd/system/docker.service.d/override.conf <<EOF [Service] ExecStart= ExecStart=/usr/bin/dockerd --host=fd:// --add-runtime=nvidia=/usr/bin/nvidia-container-runtime EOF sudo systemctl daemon-reload sudo systemctl restart docker
#Daemon configuration file
sudo tee /etc/docker/daemon.json <<EOF { "runtimes": { "nvidia": { "path": "/usr/bin/nvidia-container-runtime", "runtimeArgs": [] } } } EOF sudo pkill -SIGHUP dockerd
这里主要是在/etc/systemd/system/docker.service.d目录下新建文件override.conf,并写入ExecStart启动的路径。
完成后就出现了如上错误,docker无法启动了。
于是我又删除了override.conf文件后又可以启动了,但是NVIDIA-DOCKER还是无法启动。
以上是关于docker出现如下错误:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemo的主要内容,如果未能解决你的问题,请参考以下文章
Docker未启动错误:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon
Docker中执行tar: Cannot read: Is a directory in docker
docker安装出现"Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker da
Cannot connect to the Docker datemon at tcp://0.0.0.0:2375 is the docker daemon runing?