docker 容器pip、git安装异常;容器内web对外端口ping不通

1、docker 容器pip、git安装异常

错误信息:

git clone https://github.com/vllm-project/vllm.git
Cloning into ‘vllm’…
fatal: unable to access ‘https://github.com/vllm-project/vllm.git/’: Failed to connect to
127.0.0.1 port 10808: Connection refused

pip install vllm Looking
in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
WARNING: Retrying (Retry(total=4, connect=None, read=None,
redirect=None, status=None)) af ter connection broken by
‘ProxyError(‘Cannot connect to proxy.’,
NewConnectionError(’_vendor.urllib3.connection.HTTPSConnection object
at 0x7f26fe64fb50>: Failed to establish a new connection: [Errno 111]
Connection refused’)

基本是代理问题:
解决方法(-env http_proxy= --env https_proxy= 设置docker容器运行代理为空):

docker run --env http_proxy= --env https_proxy= --gpus all -it -v /mn**ng/:/work  容器image bash

2、容器内web对外端口ping不通

虽然docker -p 7860:7860 端口可以正常映射,但ip不是0.0.0.0也不行,必须设置0.0.0.0从外部才能正确访问容器内部启动的web

 docker run --gpus all -it -v /m****/:/work -p 18600:18600 llm:v14 python /work/Qwen-7B-main/web_demo.py  -c /work/q***odel --server-port 18600  --server-name 0.0.0.0

你可能感兴趣的:(深度学习,docker,pip,git)