Skip to content

Commit 0ead9d2

Browse files
authored
[Serving]modify docker images name (PaddlePaddle#992)
* modify docker images name * Update Dockerfile_cpu
1 parent 3c38ba4 commit 0ead9d2

File tree

7 files changed

+36
-19
lines changed

7 files changed

+36
-19
lines changed

examples/text/ernie-3.0/serving/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,16 @@ models
5151
```bash
5252
# x.y.z represent image versions. Please refer to the serving document to replace them with numbers
5353
# GPU Image
54-
docker pull paddlepaddle/fastdeploy:x.y.z-gpu-cuda11.4-trt8.4-21.10
54+
docker pull registry.baidubce.com/paddlepaddle/fastdeploy:x.y.z-gpu-cuda11.4-trt8.4-21.10
5555
# CPU Image
56-
docker pull paddlepaddle/fastdeploy:x.y.z-cpu-only-21.10
56+
docker pull registry.baidubce.com/paddlepaddle/fastdeploy:x.y.z-cpu-only-21.10
5757

5858
# Running
59-
docker run -it --net=host --name fastdeploy_server --shm-size="1g" -v /path/serving/models:/models paddlepaddle/fastdeploy:x.y.z-cpu-only-21.10 bash
59+
docker run -it --net=host --name fastdeploy_server --shm-size="1g" -v /path/serving/models:/models registry.baidubce.com/paddlepaddle/fastdeploy:x.y.z-cpu-only-21.10 bash
6060
```
6161

6262
## Deployment Models
63-
The serving directory contains the configuration to start the pipeline service and the code to send the prediction request, including
63+
The serving directory contains the configuration to start the pipeline service and the code to send the prediction request, including
6464

6565
```
6666
models # 服务化启动需要的模型仓库,包含模型和服务配置文件
@@ -70,7 +70,7 @@ token_cls_rpc_client.py # 序列标注任务发送pipeline预测请求的脚
7070

7171
*Attention*:Attention: When starting the service, each python backend process of Server requests 64M memory by default, and the docker started by default cannot start more than one python backend node. There are two solutions:
7272

73-
- 1.Set the `shm-size` parameter when starting the container, for example, `docker run -it --net=host --name fastdeploy_server --shm-size="1g" -v /path/serving/models:/models paddlepaddle/fastdeploy:x.y.z-gpu-cuda11.4-trt8.4-21.10 bash`
73+
- 1.Set the `shm-size` parameter when starting the container, for example, `docker run -it --net=host --name fastdeploy_server --shm-size="1g" -v /path/serving/models:/models registry.baidubce.com/paddlepaddle/fastdeploy:x.y.z-gpu-cuda11.4-trt8.4-21.10 bash`
7474
- 2.Set the `shm-default-byte-size` parameter of python backend when starting the service. Set the default memory of python backend to 10M: `tritonserver --model-repository=/models --backend-config=python,shm-default-byte-size=10485760`
7575

7676
### Classification Task

examples/text/ernie-3.0/serving/README_CN.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ models
5151
```bash
5252
# x.y.z为镜像版本号,需参照serving文档替换为数字
5353
# GPU镜像
54-
docker pull paddlepaddle/fastdeploy:x.y.z-gpu-cuda11.4-trt8.4-21.10
54+
docker pull registry.baidubce.com/paddlepaddle/fastdeploy:x.y.z-gpu-cuda11.4-trt8.4-21.10
5555
# CPU镜像
56-
docker pull paddlepaddle/fastdeploy:x.y.z-cpu-only-21.10
56+
docker pull registry.baidubce.com/paddlepaddle/fastdeploy:x.y.z-cpu-only-21.10
5757

5858
# 运行
59-
docker run -it --net=host --name fastdeploy_server --shm-size="1g" -v /path/serving/models:/models paddlepaddle/fastdeploy:x.y.z-cpu-only-21.10 bash
59+
docker run -it --net=host --name fastdeploy_server --shm-size="1g" -v /path/serving/models:/models registry.baidubce.com/paddlepaddle/fastdeploy:x.y.z-cpu-only-21.10 bash
6060
```
6161

6262
## 部署模型
@@ -69,7 +69,7 @@ token_cls_rpc_client.py # 序列标注任务发送pipeline预测请求的脚
6969
```
7070

7171
*注意*:启动服务时,Server的每个python后端进程默认申请`64M`内存,默认启动的docker无法启动多个python后端节点。有两个解决方案:
72-
- 1.启动容器时设置`shm-size`参数, 比如:`docker run -it --net=host --name fastdeploy_server --shm-size="1g" -v /path/serving/models:/models paddlepaddle/fastdeploy:x.y.z-gpu-cuda11.4-trt8.4-21.10 bash`
72+
- 1.启动容器时设置`shm-size`参数, 比如:`docker run -it --net=host --name fastdeploy_server --shm-size="1g" -v /path/serving/models:/models registry.baidubce.com/paddlepaddle/fastdeploy:x.y.z-gpu-cuda11.4-trt8.4-21.10 bash`
7373
- 2.启动服务时设置python后端的`shm-default-byte-size`参数, 设置python后端的默认内存为10M: `tritonserver --model-repository=/models --backend-config=python,shm-default-byte-size=10485760`
7474

7575
### 分类任务

examples/vision/classification/paddleclas/serving/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ mv ResNet50_vd_infer/inference.pdiparams models/runtime/1/model.pdiparams
2626

2727
# 拉取fastdeploy镜像(x.y.z为镜像版本号,需参照serving文档替换为数字)
2828
# GPU镜像
29-
docker pull paddlepaddle/fastdeploy:x.y.z-gpu-cuda11.4-trt8.4-21.10
29+
docker pull registry.baidubce.com/paddlepaddle/fastdeploy:x.y.z-gpu-cuda11.4-trt8.4-21.10
3030
# CPU镜像
31-
docker pull paddlepaddle/fastdeploy:x.y.z-cpu-only-21.10
31+
docker pull registry.baidubce.com/paddlepaddle/fastdeploy:x.y.z-cpu-only-21.10
3232

3333
# 运行容器.容器名字为 fd_serving, 并挂载当前目录为容器的 /serving 目录
34-
nvidia-docker run -it --net=host --name fd_serving -v `pwd`/:/serving paddlepaddle/fastdeploy:x.y.z-gpu-cuda11.4-trt8.4-21.10 bash
34+
nvidia-docker run -it --net=host --name fd_serving -v `pwd`/:/serving registry.baidubce.com/paddlepaddle/fastdeploy:x.y.z-gpu-cuda11.4-trt8.4-21.10 bash
3535

3636
# 启动服务(不设置CUDA_VISIBLE_DEVICES环境变量,会拥有所有GPU卡的调度权限)
3737
CUDA_VISIBLE_DEVICES=0 fastdeployserver --model-repository=/serving/models --backend-config=python,shm-default-byte-size=10485760

examples/vision/detection/paddledetection/serving/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ cp models/runtime/ppyoloe_runtime_config.pbtxt models/runtime/config.pbtxt
3737

3838
# 拉取fastdeploy镜像(x.y.z为镜像版本号,需替换成fastdeploy版本数字)
3939
# GPU镜像
40-
docker pull paddlepaddle/fastdeploy:x.y.z-gpu-cuda11.4-trt8.4-21.10
40+
docker pull registry.baidubce.com/paddlepaddle/fastdeploy:x.y.z-gpu-cuda11.4-trt8.4-21.10
4141
# CPU镜像
4242
docker pull paddlepaddle/fastdeploy:z.y.z-cpu-only-21.10
4343

4444

4545
# 运行容器.容器名字为 fd_serving, 并挂载当前目录为容器的 /serving 目录
46-
nvidia-docker run -it --net=host --name fd_serving --shm-size="1g" -v `pwd`/:/serving paddlepaddle/fastdeploy:x.y.z-gpu-cuda11.4-trt8.4-21.10 bash
46+
nvidia-docker run -it --net=host --name fd_serving --shm-size="1g" -v `pwd`/:/serving registry.baidubce.com/paddlepaddle/fastdeploy:x.y.z-gpu-cuda11.4-trt8.4-21.10 bash
4747

4848
# 启动服务(不设置CUDA_VISIBLE_DEVICES环境变量,会拥有所有GPU卡的调度权限)
4949
CUDA_VISIBLE_DEVICES=0 fastdeployserver --model-repository=/serving/models

examples/vision/detection/yolov5/serving/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ mv yolov5s.onnx models/runtime/1/model.onnx
2020

2121
# 拉取fastdeploy镜像(x.y.z为镜像版本号,需参照serving文档替换为数字)
2222
# GPU镜像
23-
docker pull paddlepaddle/fastdeploy:x.y.z-gpu-cuda11.4-trt8.4-21.10
23+
docker pull registry.baidubce.com/paddlepaddle/fastdeploy:x.y.z-gpu-cuda11.4-trt8.4-21.10
2424
# CPU镜像
25-
docker pull paddlepaddle/fastdeploy:x.y.z-cpu-only-21.10
25+
docker pull registry.baidubce.com/paddlepaddle/fastdeploy:x.y.z-cpu-only-21.10
2626

2727
# 运行容器.容器名字为 fd_serving, 并挂载当前目录为容器的 /yolov5_serving 目录
28-
nvidia-docker run -it --net=host --name fd_serving -v `pwd`/:/yolov5_serving paddlepaddle/fastdeploy:x.y.z-gpu-cuda11.4-trt8.4-21.10 bash
28+
nvidia-docker run -it --net=host --name fd_serving -v `pwd`/:/yolov5_serving registry.baidubce.com/paddlepaddle/fastdeploy:x.y.z-gpu-cuda11.4-trt8.4-21.10 bash
2929

3030
# 启动服务(不设置CUDA_VISIBLE_DEVICES环境变量,会拥有所有GPU卡的调度权限)
3131
CUDA_VISIBLE_DEVICES=0 fastdeployserver --model-repository=/yolov5_serving/models --backend-config=python,shm-default-byte-size=10485760

serving/Dockerfile

+10-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
ARG http_proxy
16+
ARG https_proxy
17+
1518
FROM nvcr.io/nvidia/tritonserver:21.10-py3 as full
1619
FROM nvcr.io/nvidia/tritonserver:21.10-py3-min
1720

@@ -24,7 +27,10 @@ COPY serving/TensorRT-8.4.1.5 /opt/TensorRT-8.4.1.5
2427

2528
ENV TZ=Asia/Shanghai \
2629
DEBIAN_FRONTEND=noninteractive \
27-
DCGM_VERSION=2.2.9
30+
DCGM_VERSION=2.2.9 \
31+
http_proxy=$http_proxy \
32+
https_proxy=$http_proxy
33+
2834
RUN apt-get update \
2935
&& apt-key del 7fa2af80 \
3036
&& wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb \
@@ -46,3 +52,6 @@ COPY build/fastdeploy_install /opt/fastdeploy/
4652

4753
ENV LD_LIBRARY_PATH="/opt/TensorRT-8.4.1.5/lib/:/opt/fastdeploy/lib:/opt/fastdeploy/third_libs/install/onnxruntime/lib:/opt/fastdeploy/third_libs/install/paddle2onnx/lib:/opt/fastdeploy/third_libs/install/tensorrt/lib:/opt/fastdeploy/third_libs/install/paddle_inference/paddle/lib:/opt/fastdeploy/third_libs/install/paddle_inference/third_party/install/mkldnn/lib:/opt/fastdeploy/third_libs/install/paddle_inference/third_party/install/mklml/lib:/opt/fastdeploy/third_libs/install/openvino/runtime/lib:$LD_LIBRARY_PATH"
4854
ENV PATH="/opt/tritonserver/bin:$PATH"
55+
# unset proxy
56+
ENV http_proxy=
57+
ENV https_proxy=

serving/Dockerfile_cpu

+9-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
ARG http_proxy
16+
ARG https_proxy
17+
1518
FROM paddlepaddle/fastdeploy:21.10-cpu-only-min
1619

1720
ENV TZ=Asia/Shanghai \
18-
DEBIAN_FRONTEND=noninteractive
21+
DEBIAN_FRONTEND=noninteractive \
22+
http_proxy=$http_proxy \
23+
https_proxy=$http_proxy
1924

2025
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils libgomp1 ffmpeg libsm6 libxext6 \
2126
&& python3 -m pip install -U pip \
@@ -30,3 +35,6 @@ COPY build/fastdeploy_install /opt/fastdeploy/
3035

3136
RUN mv /opt/tritonserver/bin/tritonserver /opt/tritonserver/bin/fastdeployserver
3237
ENV LD_LIBRARY_PATH="/opt/fastdeploy/lib:/opt/fastdeploy/third_libs/install/onnxruntime/lib:/opt/fastdeploy/third_libs/install/paddle2onnx/lib:/opt/fastdeploy/third_libs/install/paddle_inference/paddle/lib:/opt/fastdeploy/third_libs/install/paddle_inference/third_party/install/mkldnn/lib:/opt/fastdeploy/third_libs/install/paddle_inference/third_party/install/mklml/lib:/opt/fastdeploy/third_libs/install/openvino/runtime/lib:$LD_LIBRARY_PATH"
38+
# unset proxy
39+
ENV http_proxy=
40+
ENV https_proxy=

0 commit comments

Comments
 (0)