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
相关推荐
Patrick_Wilson12 小时前
从「改个端口」到 502:Next.js on k8s 的容器端口、Service 映射与 env 覆盖
docker·kubernetes·next.js
嘻嘻仙人13 小时前
Ubuntu中 git上传自己的项目和二次上传一般流程
git·github
Patrick_Wilson14 小时前
Squash Merge 的血缘陷阱:为什么删掉的代码又活了过来
前端·git·程序员
沉浸学习的匿名网友16 小时前
什么是 .gitignore?为什么每个 Git 项目几乎都离不开它?
前端·git
Suroy21 小时前
DockerView-Go:用 Go 写一个终端 Docker 监控工具,顺便做了个 Web 仪表盘
docker
云恒要逆袭21 小时前
运行你的第一个Docker容器
后端·docker·容器
深海鱼在掘金2 天前
Git 完全指南 —— 第3章:理解工作区、暂存区、版本库三个核心
git
江华森2 天前
Git 基础筑基:从原理到团队协作的全栈实战
git
JakeJiang2 天前
Git 必备命令指南:从日常高频到项目开发实战
git
宋均浩2 天前
# Docker 镜像瘦身实战:从 1.2G 到 80MB 的五个优化步骤
ci/cd·docker