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
相关推荐
今日无bug7 小时前
Git 提交:用全栈技术打造智能 Commit Message 生成器
git·全栈
明月_清风9 小时前
拒绝盲目 Git:VS Code 神级插件 GitLens 的 9 个进效杀手锏
前端·git
goodspeed3 天前
Git Worktree:多分支并行开发的利器
git·github
Sheffield3 天前
Docker的跨主机服务与其对应的优缺点
linux·网络协议·docker
Sheffield3 天前
Alpine是什么,为什么是Docker首选?
linux·docker·容器
马艳泽3 天前
win10下运行Start Broker and Proxy报错解决
docker
雮尘4 天前
让 AI Agent 高效并行开发的命令-git worktree
人工智能·git·agent
用户13573999256604 天前
Windows 从 0 搭建 WSL2 原生 AI 开发环境:Codex + Docker + VSCode
docker
vi_h4 天前
在 macOS 上通过 Docker 安装并运行 Ollama(详细可执行教程)
macos·docker·ollama
黑心老魔4 天前
通过 Docker 创建开发环境
docker·开发环境