From c30df2021fa2e9f9b9a75d8508e4092c257f46f4 Mon Sep 17 00:00:00 2001 From: heliqi <1101791222@qq.com> Date: Wed, 19 Oct 2022 22:55:15 -0500 Subject: [PATCH] [Serving]cpu images fix python core (#401) serving cpu fix python core --- serving/README_CN.md | 2 +- serving/docs/zh_CN/compile.md | 2 +- serving/scripts/build.sh | 12 ++++++------ serving/scripts/build_fd_backend.sh | 5 ++--- serving/scripts/build_fd_runtime.sh | 3 ++- serving/scripts/build_fd_vison.sh | 3 ++- 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/serving/README_CN.md b/serving/README_CN.md index afd0d7131..b26b4599f 100644 --- a/serving/README_CN.md +++ b/serving/README_CN.md @@ -17,7 +17,7 @@ FastDeploy基于[Triton Inference Server](https://github.com/triton-inference-se #### CPU镜像 CPU镜像仅支持Paddle/ONNX模型在CPU上进行服务化部署,支持的推理后端包括OpenVINO、Paddle Inference和ONNX Runtime ``` shell -docker pull paddlepaddle/fastdeploy:0.3.0-cpu-only +docker pull paddlepaddle/fastdeploy:0.3.0-cpu-only-21.10 ``` #### GPU镜像 diff --git a/serving/docs/zh_CN/compile.md b/serving/docs/zh_CN/compile.md index cdd2ab53d..f07db8d07 100644 --- a/serving/docs/zh_CN/compile.md +++ b/serving/docs/zh_CN/compile.md @@ -25,5 +25,5 @@ bash scripts/build.sh OFF # 退出到FastDeploy主目录,制作镜像 cd ../ -docker build -t paddlepaddle/fastdeploy:0.3.0-cpu-only -f serving/Dockerfile_cpu . +docker build -t paddlepaddle/fastdeploy:0.3.0-cpu-only-21.10 -f serving/Dockerfile_cpu . ``` diff --git a/serving/scripts/build.sh b/serving/scripts/build.sh index 261a52fec..3deff3676 100644 --- a/serving/scripts/build.sh +++ b/serving/scripts/build.sh @@ -16,14 +16,14 @@ WITH_GPU=${1:-ON} if [ $WITH_GPU == "ON" ]; then -sh build_fd_vison.sh ON -sh build_fd_runtime.sh ON -sh build_fd_backend.sh ON +bash scripts/build_fd_vison.sh ON +bash scripts/build_fd_runtime.sh ON +bash scripts/build_fd_backend.sh ON else -sh build_fd_vison.sh OFF -sh build_fd_runtime.sh OFF -sh build_fd_backend.sh OFF +bash scripts/build_fd_vison.sh OFF +bash scripts/build_fd_runtime.sh OFF +bash scripts/build_fd_backend.sh OFF fi diff --git a/serving/scripts/build_fd_backend.sh b/serving/scripts/build_fd_backend.sh index b7aaae7b4..2ddc291db 100644 --- a/serving/scripts/build_fd_backend.sh +++ b/serving/scripts/build_fd_backend.sh @@ -35,10 +35,9 @@ docker run -it --rm --name build_fd_backend \ else docker run -it --rm --name build_fd_backend \ -v`pwd`/..:/workspace/fastdeploy \ - paddlepaddle/fastdeploy:22.09-cpu-only-buildbase \ + paddlepaddle/fastdeploy:21.10-cpu-only-buildbase \ bash -c \ 'cd /workspace/fastdeploy/serving; rm -rf build; mkdir build; cd build; - apt-get update; apt-get install -y --no-install-recommends rapidjson-dev; - cmake .. -DTRITON_ENABLE_GPU=OFF -DFASTDEPLOY_DIR=/workspace/fastdeploy/build/fastdeploy-0.0.3 -DTRITON_COMMON_REPO_TAG=r22.09 -DTRITON_CORE_REPO_TAG=r22.09 -DTRITON_BACKEND_REPO_TAG=r22.09; make -j`nproc`' + cmake .. -DTRITON_ENABLE_GPU=OFF -DFASTDEPLOY_DIR=/workspace/fastdeploy/build/fastdeploy-0.0.3 -DTRITON_COMMON_REPO_TAG=r21.10 -DTRITON_CORE_REPO_TAG=r21.10 -DTRITON_BACKEND_REPO_TAG=r21.10; make -j`nproc`' fi diff --git a/serving/scripts/build_fd_runtime.sh b/serving/scripts/build_fd_runtime.sh index 723eeb366..c0f81d17f 100644 --- a/serving/scripts/build_fd_runtime.sh +++ b/serving/scripts/build_fd_runtime.sh @@ -46,10 +46,11 @@ else docker run -it --rm --name build_fd_runtime \ -v`pwd`/..:/workspace/fastdeploy \ - paddlepaddle/fastdeploy:22.09-cpu-only-buildbase \ + paddlepaddle/fastdeploy:21.10-cpu-only-buildbase \ bash -c \ 'cd /workspace/fastdeploy; rm -rf build; mkdir build; cd build; + ln -s /usr/bin/python3 /usr/bin/python; cmake .. -DENABLE_TRT_BACKEND=OFF -DCMAKE_INSTALL_PREFIX=${PWD}/fastdeploy-0.0.3 -DWITH_GPU=OFF -DENABLE_PADDLE_BACKEND=ON -DENABLE_ORT_BACKEND=ON -DENABLE_OPENVINO_BACKEND=ON -DENABLE_VISION=OFF -DBUILD_FASTDEPLOY_PYTHON=OFF -DENABLE_PADDLE_FRONTEND=ON -DENABLE_TEXT=OFF -DLIBRARY_NAME=fastdeploy_runtime; make -j`nproc`; make install' diff --git a/serving/scripts/build_fd_vison.sh b/serving/scripts/build_fd_vison.sh index 573babe66..f3ef1ca0e 100644 --- a/serving/scripts/build_fd_vison.sh +++ b/serving/scripts/build_fd_vison.sh @@ -43,10 +43,11 @@ else docker run -it --rm --name build_fd_vison \ -v`pwd`/..:/workspace/fastdeploy \ - paddlepaddle/fastdeploy:22.09-cpu-only-buildbase \ + paddlepaddle/fastdeploy:21.10-cpu-only-buildbase \ bash -c \ 'cd /workspace/fastdeploy/python; rm -rf .setuptools-cmake-build dist; + ln -s /usr/bin/python3 /usr/bin/python; export WITH_GPU=OFF; export ENABLE_VISION=ON; export ENABLE_TEXT=ON;