Skip to content

Commit

Permalink
[Serving]cpu images fix python core (PaddlePaddle#401)
Browse files Browse the repository at this point in the history
serving cpu fix python core
  • Loading branch information
heliqi authored Oct 20, 2022
1 parent 24317e1 commit c30df20
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion serving/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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镜像
Expand Down
2 changes: 1 addition & 1 deletion serving/docs/zh_CN/compile.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
```
12 changes: 6 additions & 6 deletions serving/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 2 additions & 3 deletions serving/scripts/build_fd_backend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion serving/scripts/build_fd_runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 2 additions & 1 deletion serving/scripts/build_fd_vison.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c30df20

Please sign in to comment.