Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
827be6ec
S
Serving
项目概览
PaddlePaddle
/
Serving
大约 1 年 前同步成功
通知
186
Star
833
Fork
253
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
105
列表
看板
标记
里程碑
合并请求
10
Wiki
2
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Serving
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
105
Issue
105
列表
看板
标记
里程碑
合并请求
10
合并请求
10
Pages
分析
分析
仓库分析
DevOps
Wiki
2
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
827be6ec
编写于
8月 24, 2020
作者:
B
barriery
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove useless code
上级
ae0c2d84
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
14 addition
and
19 deletion
+14
-19
tools/serving_build.sh
tools/serving_build.sh
+14
-19
未找到文件。
tools/serving_build.sh
浏览文件 @
827be6ec
...
...
@@ -305,7 +305,6 @@ function python_test_bert() {
cd
bert
# pwd: /Serving/python/examples/bert
case
$TYPE
in
CPU
)
pip
install
paddlehub
# Because download from paddlehub may timeout,
# download the model from bos(max_seq_len=128).
wget https://paddle-serving.bj.bcebos.com/paddle_hub_models/text/SemanticModel/bert_chinese_L-12_H-768_A-12.tar.gz
...
...
@@ -313,14 +312,12 @@ function python_test_bert() {
sh get_data.sh
check_cmd
"python -m paddle_serving_server.serve --model bert_chinese_L-12_H-768_A-12_model --port 9292 &"
sleep
5
pip
install
paddle_serving_app
check_cmd
"head -n 10 data-c.txt | python bert_client.py --model bert_chinese_L-12_H-768_A-12_client/serving_client_conf.prototxt"
kill_server_process
echo
"bert RPC inference pass"
;;
GPU
)
export
CUDA_VISIBLE_DEVICES
=
0
pip
install
paddlehub
# Because download from paddlehub may timeout,
# download the model from bos(max_seq_len=128).
wget https://paddle-serving.bj.bcebos.com/paddle_hub_models/text/SemanticModel/bert_chinese_L-12_H-768_A-12.tar.gz
...
...
@@ -328,7 +325,6 @@ function python_test_bert() {
sh get_data.sh
check_cmd
"python -m paddle_serving_server_gpu.serve --model bert_chinese_L-12_H-768_A-12_model --port 9292 --gpu_ids 0 &"
sleep
5
pip
install
paddle_serving_app
check_cmd
"head -n 10 data-c.txt | python bert_client.py --model bert_chinese_L-12_H-768_A-12_client/serving_client_conf.prototxt"
kill_server_process
echo
"bert RPC inference pass"
...
...
@@ -879,21 +875,20 @@ EOF
kill_process_by_port 9393
cd
..
# TODO: ci timeout
#cd web_service # pwd: /Serving/python/examples/pipeline/web_service
#sh get_data.sh
#python web_service.py >/dev/null &
#sleep 5
#curl -X POST -k http://localhost:18080/prediction -d '{"key": ["x"], "value": ["0.0137, -0.1136, 0.2553, -0.0692, 0.0582, -0.0727, -0.1583, -0.0584, 0.6283, 0.4919, 0.1856, 0.0795, -0.0332"]}'
# check http code
#http_code=`curl -X POST -k -d '{"key":["x"], "value": ["0.0137, -0.1136, 0.2553, -0.0692, 0.0582, -0.0727, -0.1583, -0.0584, 0.6283, 0.4919, 0.1856, 0.0795, -0.0332"]}' -s -w "%{http_code}" -o /dev/null http://localhost:18080/prediction`
#if [ ${http_code} -ne 200 ]; then
# echo "HTTP status code -ne 200"
# exit 1
#fi
#ps -ef | grep "web_service" | grep -v grep | awk '{print $2}' | xargs kill
#kill_server_process
#cd ..
cd
web_service
# pwd: /Serving/python/examples/pipeline/web_service
sh get_data.sh
python web_service.py
>
/dev/null &
sleep
5
curl
-X
POST
-k
http://localhost:18080/prediction
-d
'{"key": ["x"], "value": ["0.0137, -0.1136, 0.2553, -0.0692, 0.0582, -0.0727, -0.1583, -0.0584, 0.6283, 0.4919, 0.1856, 0.0795, -0.0332"]}'
check http code
http_code
=
`
curl
-X
POST
-k
-d
'{"key":["x"], "value": ["0.0137, -0.1136, 0.2553, -0.0692, 0.0582, -0.0727, -0.1583, -0.0584, 0.6283, 0.4919, 0.1856, 0.0795, -0.0332"]}'
-s
-w
"%{http_code}"
-o
/dev/null http://localhost:18080/prediction
`
if
[
${
http_code
}
-ne
200
]
;
then
echo
"HTTP status code -ne 200"
exit
1
fi
ps
-ef
|
grep
"web_service"
|
grep
-v
grep
|
awk
'{print $2}'
| xargs
kill
kill_server_process
cd
..
;;
GPU
)
cd
web_service
# pwd: /Serving/python/examples/pipeline/web_service
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录