nvidia-docker无法与http://localhost:3476/docker/cli/json
交谈Traceback (most recent call last):
File "/usr/local/bin/nvidia-docker-compose", line 43, in <module>
resp = request.urlopen('http://{0}/docker/cli/json'.format(args.nvidia_docker_host)).read().decode()
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 447, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1228, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 111] Connection refused>
答案 0 :(得分:0)
全新安装的nvidia-docker-compose解决了这个问题:
wget -P /tmp https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.1/nvidia-docker_1.0.1-1_amd64.deb
sudo dpkg -i /tmp/nvidia-docker*.deb && rm /tmp/nvidia-docker*.deb
然后测试它:
nvidia-docker run --rm nvidia/cuda nvidia-smi
答案 1 :(得分:0)
遇到这个问题,客户还没有设法运行nvidia-docker-compose。甚至在重新安装docker和nvidia-docker之后,nvidia-docker对localhost:3476上的docker进行的查询没有得到任何响应(请参阅nvidia-docker-compose code here)
我设法通过生成一个手工制作的docker-compose文件来解决这个问题,因为它们非常简单,按照这个例子,用你的nvidia驱动程序版本替换375.66并放入尽可能多的/ dev / nvidia [n]行因为你有图形卡(没有尝试将服务放在单独的GPU上但是去了!):
services:
exampleservice0:
devices:
- /dev/nvidia0
- /dev/nvidia1
- /dev/nvidiactl
- /dev/nvidia-uvm
- /dev/nvidia-uvm-tools
environment:
- EXAMPLE_ENV_VARIABLE=example
image: company/image
volumes:
- ./disk:/disk
- nvidia_driver_375.66:/usr/local/nvidia:ro
version: '2'
volumes:
media: null
nvidia_driver_375.66:
external: true
然后用经典的docker-compose命令运行这个手工制作的docker-compose文件。