Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
16ddf8d2
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看板
提交
16ddf8d2
编写于
3月 21, 2020
作者:
B
barrierye
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add rerun function(due to some network reasons, compilation may fail) && test=serving
上级
432a1f42
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
27 addition
and
4 deletion
+27
-4
tools/serving_build.sh
tools/serving_build.sh
+27
-4
未找到文件。
tools/serving_build.sh
浏览文件 @
16ddf8d2
...
@@ -26,6 +26,27 @@ function check_cmd() {
...
@@ -26,6 +26,27 @@ function check_cmd() {
fi
fi
}
}
function
rerun
()
{
if
[
$#
-ne
2
]
;
then
echo
"usage: rerun command rerun-times"
exit
1
fi
local command
=
$1
local times
=
$2
for
((
i
=
1
;
i<
=
${
times
}
;
i++
))
do
if
[
${
i
}
!=
1
]
;
then
echo
"
${
i
}
-th run command:
${
command
}
..."
fi
eval
$command
if
[
$?
-eq
0
]
;
then
return
0
fi
echo
"
${
i
}
-th run(command:
${
command
}
) failed."
done
exit
1
}
function
build_client
()
{
function
build_client
()
{
local
TYPE
=
$1
local
TYPE
=
$1
local
DIRNAME
=
build-client-
$TYPE
local
DIRNAME
=
build-client-
$TYPE
...
@@ -37,7 +58,7 @@ function build_client() {
...
@@ -37,7 +58,7 @@ function build_client() {
-DPYTHON_LIBRARIES
=
$PYTHONROOT
/lib64/libpython2.7.so
\
-DPYTHON_LIBRARIES
=
$PYTHONROOT
/lib64/libpython2.7.so
\
-DPYTHON_EXECUTABLE
=
$PYTHONROOT
/bin/python
\
-DPYTHON_EXECUTABLE
=
$PYTHONROOT
/bin/python
\
-DCLIENT_ONLY
=
ON ..
-DCLIENT_ONLY
=
ON ..
check_cmd
"make -j2 >/dev/null"
rerun
"make -j2 >/dev/null"
3
# due to some network reasons, compilation may fail
pip
install
-U
python/dist/paddle_serving_client
*
>
/dev/null
pip
install
-U
python/dist/paddle_serving_client
*
>
/dev/null
;;
;;
*
)
*
)
...
@@ -47,7 +68,7 @@ function build_client() {
...
@@ -47,7 +68,7 @@ function build_client() {
esac
esac
echo
"build client
$TYPE
part finished as expected."
echo
"build client
$TYPE
part finished as expected."
cd
..
# pwd: /Serving
cd
..
# pwd: /Serving
rm
-rf
$DIRNAME
#
rm -rf $DIRNAME
}
}
function
build_server
()
{
function
build_server
()
{
...
@@ -61,7 +82,8 @@ function build_server() {
...
@@ -61,7 +82,8 @@ function build_server() {
-DPYTHON_LIBRARIES
=
$PYTHONROOT
/lib64/libpython2.7.so
\
-DPYTHON_LIBRARIES
=
$PYTHONROOT
/lib64/libpython2.7.so
\
-DPYTHON_EXECUTABLE
=
$PYTHONROOT
/bin/python
\
-DPYTHON_EXECUTABLE
=
$PYTHONROOT
/bin/python
\
-DCLIENT_ONLY
=
OFF ..
-DCLIENT_ONLY
=
OFF ..
check_cmd
"make -j2 >/dev/null && make install -j2 >/dev/null"
rerun
"make -j2 >/dev/null"
3
# due to some network reasons, compilation may fail
check_cmd
"make install -j2 >/dev/null"
pip
install
-U
python/dist/paddle_serving_server
*
>
/dev/null
pip
install
-U
python/dist/paddle_serving_server
*
>
/dev/null
;;
;;
GPU
)
GPU
)
...
@@ -70,7 +92,8 @@ function build_server() {
...
@@ -70,7 +92,8 @@ function build_server() {
-DPYTHON_EXECUTABLE
=
$PYTHONROOT
/bin/python
\
-DPYTHON_EXECUTABLE
=
$PYTHONROOT
/bin/python
\
-DCLIENT_ONLY
=
OFF
\
-DCLIENT_ONLY
=
OFF
\
-DWITH_GPU
=
ON ..
-DWITH_GPU
=
ON ..
check_cmd
"make -j2 >/dev/null && make install -j2 >/dev/null"
rerun
"make -j2 >/dev/null"
3
# due to some network reasons, compilation may fail
check_cmd
"make install -j2 >/dev/null"
pip
install
-U
python/dist/paddle_serving_server
*
>
/dev/null
pip
install
-U
python/dist/paddle_serving_server
*
>
/dev/null
;;
;;
*
)
*
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录