From 49e42a16a7f256c5c5e69169cacbede02200e205 Mon Sep 17 00:00:00 2001 From: tink2123 Date: Tue, 7 Sep 2021 15:50:04 +0800 Subject: [PATCH] add service mode for prepare --- tests/prepare.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/tests/prepare.sh b/tests/prepare.sh index 828705c3..f725b9b3 100644 --- a/tests/prepare.sh +++ b/tests/prepare.sh @@ -1,6 +1,6 @@ #!/bin/bash FILENAME=$1 -# MODE be one of ['lite_train_infer' 'whole_infer' 'whole_train_infer', 'infer'] +# MODE be one of ['lite_train_infer' 'whole_infer' 'whole_train_infer', 'infer', 'serving_infer'] MODE=$2 dataline=$(cat ${FILENAME}) @@ -75,13 +75,14 @@ else fi fi -# prepare serving env -python_name=$(func_parser_value "${lines[2]}") -${python_name} -m pip install install paddle-serving-server-gpu==0.6.1.post101 -${python_name} -m pip install paddle_serving_client==0.6.1 -${python_name} -m pip install paddle-serving-app==0.6.1 -wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_infer.tar -wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_infer.tar -cd ./inference && tar xf ch_ppocr_mobile_v2.0_det_infer.tar && tar xf ch_ppocr_mobile_v2.0_rec_infer.tar - +if [ ${MODE} = "serving_infer" ];then + # prepare serving env + python_name=$(func_parser_value "${lines[2]}") + ${python_name} -m pip install install paddle-serving-server-gpu==0.6.1.post101 + ${python_name} -m pip install paddle_serving_client==0.6.1 + ${python_name} -m pip install paddle-serving-app==0.6.1 + wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_infer.tar + wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_infer.tar + cd ./inference && tar xf ch_ppocr_mobile_v2.0_det_infer.tar && tar xf ch_ppocr_mobile_v2.0_rec_infer.tar +fi -- GitLab