VisualDL icon indicating copy to clipboard operation
VisualDL copied to clipboard

Docker拉取1.0.4版本的镜像,使用host网络模式启动镜像时,容器内无法访问外部网络

Open RayLumia opened this issue 2 years ago • 3 comments

使用Docker拉取FastDeploy镜像: docker pull registry.baidubce.com/paddlepaddle/fastdeploy:1.0.4-gpu-cuda11.4-trt8.5-21.10 使用Host网络模式启动镜像: docker run -it -e NVIDIA_DRIVER_CAPABILITIES=compute,utility -e NVIDIA_VISIBLE_DEVICES=all --net=host --name fd_serving -v pwd/:/FastDeploy registry.baidubce.com/paddlepaddle/fastdeploy:1.0.4-gpu-cuda11.4-trt8.5-21.10 /bin/bash 进入容器后,由于visualdl版本仍然是2.4.x版本,想要升级到2.5.x版本时,发现无法访问外部网络

RayLumia avatar Mar 19 '23 05:03 RayLumia

是链接不上外部网络吗,外部网络能够连接进入你的容器吗,比如python3 -m http.server 8666 , 能不能打开容器里启动的http服务呢

rainyfly avatar Mar 23 '23 07:03 rainyfly

你好,ping和curl外部网络都失败,但是能解析到目的IP地址,外部网络可以访问容器开放的http服务

RayLumia avatar Mar 23 '23 12:03 RayLumia

有没有可能是容器里面其实默认是开了代理的,比如unset https_proxy一下

rainyfly avatar Apr 02 '23 06:04 rainyfly