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
相关推荐
马优晨13 分钟前
Git 中的某个分支打标签
git·git 中的某个分支打标签·git分支打标签·git 分支打tag·git 分支打标签tag
黑金IT33 分钟前
本地 Docker 镜像送上云:腾讯云无服务器与容器化全栈迁移实战
docker·serverless·腾讯云
Blue桃之夭夭36 分钟前
git和VScode
ide·git·vscode
勇往直前plus1 小时前
CentOS 7 环境下 RabbitMQ 的部署与 Web 管理界面基本使用指南
前端·docker·centos·rabbitmq
Roam-G2 小时前
在 Mac 上使用 Docker 安装 Milvus 2.6.2
docker·容器·milvus
敲上瘾3 小时前
Docker镜像构建指南:Dockerfile语法与docker build命令全解析
linux·服务器·docker·微服务·容器
YC运维7 小时前
Dockerfile实战案例详解
运维·docker·容器
码厂一粒沙8 小时前
【代码管理】git使用指南(新手向)
git
小灰灰的可爱无人可替代11 小时前
记录一次使用docker和docker-compose更新vue前端项目问题
nginx·docker·vue
李贺梖梖17 小时前
Git初识
git