Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleOCR
提交
a2bd540c
P
PaddleOCR
项目概览
s920243400
/
PaddleOCR
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleOCR
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleOCR
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a2bd540c
编写于
9月 01, 2021
作者:
T
tink2123
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update test.sh for serving
上级
bd025cd2
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
29 addition
and
14 deletion
+29
-14
tests/prepare.sh
tests/prepare.sh
+3
-2
tests/test.sh
tests/test.sh
+26
-12
未找到文件。
tests/prepare.sh
浏览文件 @
a2bd540c
...
@@ -77,9 +77,10 @@ fi
...
@@ -77,9 +77,10 @@ fi
# prepare serving env
# prepare serving env
python_name
=
$(
func_parser_value
"
${
lines
[2]
}
"
)
python_name
=
$(
func_parser_value
"
${
lines
[2]
}
"
)
${
python_name
}
-m
pip
install install
paddle-serving-server-gpu
==
0.6.1.post101
wget https://paddle-serving.bj.bcebos.com/chain/paddle_serving_server_gpu-0.0.0.post101-py3-none-any.whl
${
python_name
}
-m
pip
install install
paddle_serving_server_gpu-0.0.0.post101-py3-none-any.whl
${
python_name
}
-m
pip
install
paddle_serving_client
==
0.6.1
${
python_name
}
-m
pip
install
paddle_serving_client
==
0.6.1
${
python_name
}
-m
pip
install
paddle-serving-app
==
0.6.
1
${
python_name
}
-m
pip
install
paddle-serving-app
==
0.6.
3
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_det_infer.tar
wget
-nc
-P
./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_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
cd
./inference
&&
tar
xf ch_ppocr_mobile_v2.0_det_infer.tar
&&
tar
xf ch_ppocr_mobile_v2.0_rec_infer.tar
...
...
tests/test.sh
浏览文件 @
a2bd540c
...
@@ -168,7 +168,7 @@ web_use_trt_key=$(func_parser_key "${lines[63]}")
...
@@ -168,7 +168,7 @@ web_use_trt_key=$(func_parser_key "${lines[63]}")
web_use_trt_list
=
$(
func_parser_value
"
${
lines
[63]
}
"
)
web_use_trt_list
=
$(
func_parser_value
"
${
lines
[63]
}
"
)
web_precision_key
=
$(
func_parser_key
"
${
lines
[64]
}
"
)
web_precision_key
=
$(
func_parser_key
"
${
lines
[64]
}
"
)
web_precision_list
=
$(
func_parser_value
"
${
lines
[64]
}
"
)
web_precision_list
=
$(
func_parser_value
"
${
lines
[64]
}
"
)
pipline_py
=
$(
func_parser_value
"
${
lines
[65]
}
"
)
pip
e
line_py
=
$(
func_parser_value
"
${
lines
[65]
}
"
)
LOG_PATH
=
"./tests/output"
LOG_PATH
=
"./tests/output"
...
@@ -259,6 +259,8 @@ function func_serving(){
...
@@ -259,6 +259,8 @@ function func_serving(){
eval
$trans_model_cmd
eval
$trans_model_cmd
cd
${
serving_dir_value
}
cd
${
serving_dir_value
}
echo
$PWD
echo
$PWD
unset
https_proxy
unset
http_proxy
for
use_gpu
in
${
web_use_gpu_list
[*]
}
;
do
for
use_gpu
in
${
web_use_gpu_list
[*]
}
;
do
echo
${
ues_gpu
}
echo
${
ues_gpu
}
if
[
${
use_gpu
}
=
"null"
]
;
then
if
[
${
use_gpu
}
=
"null"
]
;
then
...
@@ -269,12 +271,18 @@ function func_serving(){
...
@@ -269,12 +271,18 @@ function func_serving(){
for
threads
in
${
web_cpu_threads_list
[*]
}
;
do
for
threads
in
${
web_cpu_threads_list
[*]
}
;
do
_save_log_path
=
"
${
_log_path
}
/server_cpu_usemkldnn_
${
use_mkldnn
}
_threads_
${
threads
}
_batchsize_1.log"
_save_log_path
=
"
${
_log_path
}
/server_cpu_usemkldnn_
${
use_mkldnn
}
_threads_
${
threads
}
_batchsize_1.log"
set_cpu_threads
=
$(
func_set_params
"
${
web_cpu_threads_key
}
"
"
${
threads
}
"
)
set_cpu_threads
=
$(
func_set_params
"
${
web_cpu_threads_key
}
"
"
${
threads
}
"
)
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
web_use_gpu_key
}
=
${
use_gpu
}
${
web_use_mkldnn_key
}
=
${
use_mkldnn
}
${
set_cpu_threads
}
&>log.txt &"
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
web_use_gpu_key
}
=
${
use_gpu
}
${
web_use_mkldnn_key
}
=
${
use_mkldnn
}
${
set_cpu_threads
}
&>
${
_save_log_path
}
&"
echo
$web_service_cmd
eval
$web_service_cmd
eval
$web_service_cmd
pipline_cmd
=
"
${
python
}
${
pipline_py
}
"
sleep
2s
echo
$pipline_cmd
pipeline_cmd
=
"
${
python
}
${
pipeline_py
}
"
eval
$pipline_cmd
eval
$pipeline_cmd
last_status
=
${
PIPESTATUS
[0]
}
eval
"cat
${
_save_log_path
}
"
status_check
$last_status
"
${
pipeline_cmd
}
"
"
${
status_log
}
"
PID
=
$!
kill
$PID
sleep
2s
ps ux |
grep
-E
'web_service|pipeline'
|
awk
'{print $2}'
| xargs
kill
-s
9
done
done
done
done
elif
[
${
use_gpu
}
=
"0"
]
;
then
elif
[
${
use_gpu
}
=
"0"
]
;
then
...
@@ -286,18 +294,24 @@ function func_serving(){
...
@@ -286,18 +294,24 @@ function func_serving(){
if
[[
${
precision
}
=
~
"fp16"
||
${
precision
}
=
~
"int8"
]]
&&
[
${
use_trt
}
=
"False"
]
;
then
if
[[
${
precision
}
=
~
"fp16"
||
${
precision
}
=
~
"int8"
]]
&&
[
${
use_trt
}
=
"False"
]
;
then
continue
continue
fi
fi
if
[[
${
use_trt
}
=
"Fal
se"
||
${
precision
}
=
~
"int8"
]]
&&
[
${
_flag_quant
}
=
"True"
]
;
then
if
[[
${
use_trt
}
=
"Fal
g_quantse"
||
${
precision
}
=
~
"int8"
]
]
;
then
continue
continue
fi
fi
_save_log_path
=
"
${
_log_path
}
/infer_gpu_usetrt_
${
use_trt
}
_precision_
${
precision
}
_batchsize_1.log"
_save_log_path
=
"
${
_log_path
}
/infer_gpu_usetrt_
${
use_trt
}
_precision_
${
precision
}
_batchsize_1.log"
set_tensorrt
=
$(
func_set_params
"
${
web_use_trt_key
}
"
"
${
use_trt
}
"
)
set_tensorrt
=
$(
func_set_params
"
${
web_use_trt_key
}
"
"
${
use_trt
}
"
)
set_precision
=
$(
func_set_params
"
${
web_precision_key
}
"
"
${
precision
}
"
)
set_precision
=
$(
func_set_params
"
${
web_precision_key
}
"
"
${
precision
}
"
)
web_service_cmd
=
"
${
_python
}
${
web_service_py
}
${
web_use_gpu_key
}
=
${
use_gpu
}
${
web_use_trt_key
}
=
${
set_tensorrt
}
${
set_precision
}
>
${
_save_log_path
}
&>log.txt & "
web_service_cmd
=
"
${
python
}
${
web_service_py
}
${
web_use_gpu_key
}
=
${
use_gpu
}
${
set_tensorrt
}
${
set_precision
}
&>
${
_save_log_path
}
& "
echo
$web_service_cmd
eval
$web_service_cmd
eval
$web_service_cmd
pipline_cmd
=
"
${
python
}
${
pipline_py
}
"
sleep
2s
echo
$pipline_cmd
pipeline_cmd
=
"
${
python
}
${
pipeline_py
}
"
eval
$pipline_cmd
eval
$pipeline_cmd
last_status
=
${
PIPESTATUS
[0]
}
eval
"cat
${
_save_log_path
}
"
status_check
$last_status
"
${
pipeline_cmd
}
"
"
${
status_log
}
"
PID
=
$!
kill
$PID
sleep
2s
ps ux |
grep
-E
'web_service|pipeline'
|
awk
'{print $2}'
| xargs
kill
-s
9
done
done
done
done
else
else
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录