Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
fca23995
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看板
提交
fca23995
编写于
11月 16, 2021
作者:
B
bjjwwang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix Kubernetes doc and some scripts
上级
9ba8005e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
39 addition
and
57 deletion
+39
-57
doc/Latest_Packages_CN.md
doc/Latest_Packages_CN.md
+1
-1
doc/Run_On_Kubernetes_CN.md
doc/Run_On_Kubernetes_CN.md
+3
-3
tools/dockerfiles/build_scripts/install_trt.sh
tools/dockerfiles/build_scripts/install_trt.sh
+1
-1
tools/dockerfiles/build_scripts/install_whl.sh
tools/dockerfiles/build_scripts/install_whl.sh
+25
-45
tools/generate_runtime_docker.sh
tools/generate_runtime_docker.sh
+9
-7
未找到文件。
doc/Latest_Packages_CN.md
浏览文件 @
fca23995
...
...
@@ -80,7 +80,7 @@ https://paddle-serving.bj.bcebos.com/test-dev/bin/serving-gpu-102-0.0.0.tar.gz
# Cuda 10.2 + Cudnn 8
https://paddle-serving.bj.bcebos.com/test-dev/bin/serving-gpu-1028-0.0.0.tar.gz
# Cuda 11.2
https://paddle-serving.bj.bcebos.com/test-dev/bin/serving-gpu-
cuda
112-0.0.0.tar.gz
https://paddle-serving.bj.bcebos.com/test-dev/bin/serving-gpu-112-0.0.0.tar.gz
```
#### How to setup SERVING_BIN offline?
...
...
doc/Run_On_Kubernetes_CN.md
浏览文件 @
fca23995
...
...
@@ -25,10 +25,10 @@ kubectl apply -f https://bit.ly/kong-ingress-dbless
在
`tools/generate_runtime_docker.sh`
文件下,它的使用方式如下
```
bash
bash tools/generate_runtime_docker.sh
--env
cuda10.1
--python
3.6
--serving
0.
6.0
--paddle
2.0.1
--name
serving_runtime:cuda10.1-py36
bash tools/generate_runtime_docker.sh
--env
cuda10.1
--python
3.6
--serving
0.
7.0
--paddle
2.2.0
--name
serving_runtime:cuda10.1-py36
```
会生成 cuda10.1,python 3.6,serving版本0.
6.0 还有 paddle版本2.0.1
的运行镜像。如果有其他疑问,可以执行下列语句得到帮助信息。
会生成 cuda10.1,python 3.6,serving版本0.
7.0 还有 paddle版本2.2.0
的运行镜像。如果有其他疑问,可以执行下列语句得到帮助信息。
```
bash tools/generate_runtime_docker.sh --help
...
...
@@ -83,7 +83,7 @@ python3.6 web_service.py
web service模式本质上和pipeline模式类似,因此我们以
`Serving/examples/C++/PaddleNLP/bert`
为例
```
bash
#假设您已经拥有Serving运行镜像,假设镜像名为registry.baidubce.com/paddlepaddle/serving:0.
6.0-cuda10.2
-py36
#假设您已经拥有Serving运行镜像,假设镜像名为registry.baidubce.com/paddlepaddle/serving:0.
7.0-cpu
-py36
docker run
--rm
-dit
--name
webservice_serving_demo registry.baidubce.com/paddlepaddle/serving:0.6.0-cpu-py36 bash
cd
Serving/examples/C++/PaddleNLP/bert
### download model
...
...
tools/dockerfiles/build_scripts/install_trt.sh
浏览文件 @
fca23995
...
...
@@ -24,7 +24,7 @@ if [[ "$VERSION" == "cuda10.1" ]];then
rm
TensorRT6-cuda10.1-cudnn7.tar.gz
elif
[[
"
$VERSION
"
==
"cuda11.2"
]]
;
then
wget https://paddle-ci.gz.bcebos.com/TRT/TensorRT-8.0.3.4.Linux.x86_64-gnu.cuda-11.3.cudnn8.2.tar.gz
--no-check-certificate
tar
-zxf
TensorRT-8.0.3.4.Linux.x86_64-gnu.cuda-11.3.cudnn8.2.tar.gz
tar
-zxf
TensorRT-8.0.3.4.Linux.x86_64-gnu.cuda-11.3.cudnn8.2.tar.gz
-C
/usr/local
cp
-rf
/usr/local/TensorRT-8.0.3.4/include/
*
/usr/include/
&&
cp
-rf
/usr/local/TensorRT-8.0.3.4/lib/
*
/usr/lib/
rm
-rf
TensorRT-8.0.3.4.Linux.x86_64-gnu.cuda-11.3.cudnn8.2.tar.gz
elif
[[
"
$VERSION
"
==
"cuda10.2"
]]
;
then
...
...
tools/dockerfiles/build_scripts/install_whl.sh
浏览文件 @
fca23995
...
...
@@ -20,7 +20,7 @@ RUN_ENV=$3 # cpu/10.1 10.2
PYTHON_VERSION
=
$4
serving_release
=
client_release
=
"paddle-serving-client==
$SERVING_VERSION
"
app_release
=
"paddle-serving-app==
0.3.1
"
app_release
=
"paddle-serving-app==
$SERVING_VERSION
"
if
[[
$PYTHON_VERSION
==
"3.6"
]]
;
then
CPYTHON
=
"36"
...
...
@@ -33,48 +33,28 @@ elif [[ $PYTHON_VERSION == "3.8" ]];then
CPYTHON_PADDLE
=
"38"
fi
if
[[
$SERVING_VERSION
==
"0.5.0"
]]
;
then
if
[[
"
$RUN_ENV
"
==
"cpu"
]]
;
then
server_release
=
"paddle-serving-server==
$SERVING_VERSION
"
serving_bin
=
"https://paddle-serving.bj.bcebos.com/bin/serving-cpu-avx-mkl-
${
SERVING_VERSION
}
.tar.gz"
paddle_whl
=
"https://paddle-wheel.bj.bcebos.com/
$PADDLE_VERSION
-cpu-avx-mkl/paddlepaddle-
$PADDLE_VERSION
-cp
$CPYTHON
-cp
$CPYTHON_PADDLE
-linux_x86_64.whl"
elif
[[
"
$RUN_ENV
"
==
"cuda10.1"
]]
;
then
server_release
=
"paddle-serving-server-gpu==
$SERVING_VERSION
.post101"
serving_bin
=
"https://paddle-serving.bj.bcebos.com/bin/serving-gpu-101-
${
SERVING_VERSION
}
.tar.gz"
paddle_whl
=
"https://paddle-wheel.bj.bcebos.com/with-trt/
$PADDLE_VERSION
-gpu-cuda10.1-cudnn7-mkl-gcc8.2/paddlepaddle_gpu-
$PADDLE_VERSION
.post101-cp
$CPYTHON
-cp
$CPYTHON_PADDLE
-linux_x86_64.whl"
elif
[[
"
$RUN_ENV
"
==
"cuda10.2"
]]
;
then
server_release
=
"paddle-serving-server-gpu==
$SERVING_VERSION
.post102"
serving_bin
=
"https://paddle-serving.bj.bcebos.com/bin/serving-gpu-102-
${
SERVING_VERSION
}
.tar.gz"
paddle_whl
=
"https://paddle-wheel.bj.bcebos.com/with-trt/
$PADDLE_VERSION
-gpu-cuda10.2-cudnn8-mkl-gcc8.2/paddlepaddle_gpu-
$PADDLE_VERSION
-cp
$CPYTHON
-cp
$CPYTHON_PADDLE
-linux_x86_64.whl"
elif
[[
"
$RUN_ENV
"
==
"cuda11"
]]
;
then
server_release
=
"paddle-serving-server-gpu==
$SERVING_VERSION
.post11"
serving_bin
=
"https://paddle-serving.bj.bcebos.com/bin/serving-gpu-cuda11-
${
SERVING_VERSION
}
.tar.gz"
paddle_whl
=
"https://paddle-wheel.bj.bcebos.com/with-trt/
$PADDLE_VERSION
-gpu-cuda11.0-cudnn8-mkl-gcc8.2/paddlepaddle_gpu-
$PADDLE_VERSION
.post110-cp
$CPYTHON
-cp
$CPYTHON_PADDLE
-linux_x86_64.whl"
fi
client_release
=
"paddle-serving-client==
$SERVING_VERSION
"
app_release
=
"paddle-serving-app==0.3.1"
else
if
[[
"
$RUN_ENV
"
==
"cpu"
]]
;
then
server_release
=
"https://paddle-serving.bj.bcebos.com/test-dev/whl/paddle_serving_server-
$SERVING_VERSION
-py3-none-any.whl"
serving_bin
=
"https://paddle-serving.bj.bcebos.com/test-dev/bin/serving-cpu-avx-mkl-
$SERVING_VERSION
.tar.gz"
paddle_whl
=
"https://paddle-wheel.bj.bcebos.com/
$PADDLE_VERSION
-cpu-avx-mkl/paddlepaddle-
$PADDLE_VERSION
-cp
$CPYTHON
-cp
$CPYTHON_PADDLE
-linux_x86_64.whl"
elif
[[
"
$RUN_ENV
"
==
"cuda10.1"
]]
;
then
server_release
=
"https://paddle-serving.bj.bcebos.com/test-dev/whl/paddle_serving_server_gpu-
$SERVING_VERSION
.post101-py3-none-any.whl"
serving_bin
=
"https://paddle-serving.bj.bcebos.com/test-dev/bin/serving-gpu-101-
$SERVING_VERSION
.tar.gz"
paddle_whl
=
"https://paddle-wheel.bj.bcebos.com/with-trt/
$PADDLE_VERSION
-gpu-cuda10.1-cudnn7-mkl-gcc8.2/paddlepaddle_gpu-
$PADDLE_VERSION
.post101-cp
$CPYTHON
-cp
$CPYTHON_PADDLE
-linux_x86_64.whl"
elif
[[
"
$RUN_ENV
"
==
"cuda10.2"
]]
;
then
server_release
=
"https://paddle-serving.bj.bcebos.com/test-dev/whl/paddle_serving_server_gpu-
$SERVING_VERSION
.post102-py3-none-any.whl"
serving_bin
=
"https://paddle-serving.bj.bcebos.com/test-dev/bin/serving-gpu-102-
$SERVING_VERSION
.tar.gz"
paddle_whl
=
"https://paddle-wheel.bj.bcebos.com/with-trt/
$PADDLE_VERSION
-gpu-cuda10.2-cudnn8-mkl-gcc8.2/paddlepaddle_gpu-
$PADDLE_VERSION
-cp
$CPYTHON
-cp
$CPYTHON_PADDLE
-linux_x86_64.whl"
elif
[[
"
$RUN_ENV
"
==
"cuda11"
]]
;
then
server_release
=
"https://paddle-serving.bj.bcebos.com/test-dev/whl/paddle_serving_server_gpu-
$SERVING_VERSION
.post11-py3-none-any.whl"
serving_bin
=
"https://paddle-serving.bj.bcebos.com/test-dev/bin/serving-gpu-cuda11-
$SERVING_VERSION
.tar.gz"
paddle_whl
=
"https://paddle-wheel.bj.bcebos.com/with-trt/
$PADDLE_VERSION
-gpu-cuda11.0-cudnn8-mkl-gcc8.2/paddlepaddle_gpu-
$PADDLE_VERSION
.post110-cp
$CPYTHON
-cp
$CPYTHON_PADDLE
-linux_x86_64.whl"
fi
client_release
=
"https://paddle-serving.bj.bcebos.com/test-dev/whl/paddle_serving_client-
$SERVING_VERSION
-cp
$CPYTHON
-none-any.whl"
app_release
=
"https://paddle-serving.bj.bcebos.com/test-dev/whl/paddle_serving_app-
$SERVING_VERSION
-py3-none-any.whl"
if
[[
"
$RUN_ENV
"
==
"cpu"
]]
;
then
server_release
=
"https://paddle-serving.bj.bcebos.com/test-dev/whl/paddle_serving_server-
$SERVING_VERSION
-py3-none-any.whl"
serving_bin
=
"https://paddle-serving.bj.bcebos.com/test-dev/bin/serving-cpu-avx-mkl-
$SERVING_VERSION
.tar.gz"
paddle_whl
=
"paddlepaddle==
$PADDLE_VERSION
"
elif
[[
"
$RUN_ENV
"
==
"cuda10.1"
]]
;
then
server_release
=
"https://paddle-serving.bj.bcebos.com/test-dev/whl/paddle_serving_server_gpu-
$SERVING_VERSION
.post101-py3-none-any.whl"
serving_bin
=
"https://paddle-serving.bj.bcebos.com/test-dev/bin/serving-gpu-101-
$SERVING_VERSION
.tar.gz"
paddle_whl
=
"https://paddle-inference-lib.bj.bcebos.com/
$PADDLE_VERSION
/python/Linux/GPU/x86-64_gcc8.2_avx_mkl_cuda10.1_cudnn7.6.5_trt6.0.1.5/paddlepaddle_gpu-
$PADDLE_VERSION
.post101-cp
$CPYTHON
-cp
$CPYTHON_PADDLE
-linux_x86_64.whl"
elif
[[
"
$RUN_ENV
"
==
"cuda10.2"
]]
;
then
server_release
=
"https://paddle-serving.bj.bcebos.com/test-dev/whl/paddle_serving_server_gpu-
$SERVING_VERSION
.post1028-py3-none-any.whl"
serving_bin
=
"https://paddle-serving.bj.bcebos.com/test-dev/bin/serving-gpu-1028-
$SERVING_VERSION
.tar.gz"
paddle_whl
=
"https://paddle-inference-lib.bj.bcebos.com/
$PADDLE_VERSION
/python/Linux/GPU/x86-64_gcc8.2_avx_mkl_cuda10.2_cudnn8.1.1_trt7.2.3.4/paddlepaddle_gpu-
$PADDLE_VERSION
-cp
$CPYTHON
-cp
$CPYTHON_PADDLE
-linux_x86_64.whl"
elif
[[
"
$RUN_ENV
"
==
"cuda11.2"
]]
;
then
server_release
=
"https://paddle-serving.bj.bcebos.com/test-dev/whl/paddle_serving_server_gpu-
$SERVING_VERSION
.post112-py3-none-any.whl"
serving_bin
=
"https://paddle-serving.bj.bcebos.com/test-dev/bin/serving-gpu-112-
$SERVING_VERSION
.tar.gz"
paddle_whl
=
"https://paddle-inference-lib.bj.bcebos.com/
$PADDLE_VERSION
/python/Linux/GPU/x86-64_gcc8.2_avx_mkl_cuda11.2_cudnn8.2.1_trt8.0.3.4/paddlepaddle_gpu-
$PADDLE_VERSION
.post112-cp
$CPYTHON
-cp
$CPYTHON_PADDLE
-linux_x86_64.whl"
fi
client_release
=
"https://paddle-serving.bj.bcebos.com/test-dev/whl/paddle_serving_client-
$SERVING_VERSION
-cp
$CPYTHON
-none-any.whl"
app_release
=
"https://paddle-serving.bj.bcebos.com/test-dev/whl/paddle_serving_app-
$SERVING_VERSION
-py3-none-any.whl"
if
[[
"
$RUN_ENV
"
==
"cpu"
]]
;
then
python
$PYTHON_VERSION
-m
pip
install
$client_release
$app_release
$server_release
python
$PYTHON_VERSION
-m
pip
install
$paddle_whl
...
...
@@ -105,15 +85,15 @@ elif [[ "$RUN_ENV" == "cuda10.2" ]];then
echo
"export SERVING_BIN=
$PWD
/serving_bin/serving"
>>
/root/.bashrc
rm
-rf
serving-gpu-102-
${
SERVING_VERSION
}
.tar.gz
cd
-
elif
[[
"
$RUN_ENV
"
==
"cuda11"
]]
;
then
elif
[[
"
$RUN_ENV
"
==
"cuda11
.2
"
]]
;
then
python
$PYTHON_VERSION
-m
pip
install
$client_release
$app_release
$server_release
python
$PYTHON_VERSION
-m
pip
install
$paddle_whl
cd
/usr/local/
wget
$serving_bin
tar
xf serving-gpu-
cuda11
-
${
SERVING_VERSION
}
.tar.gz
mv
$PWD
/serving-gpu-
cuda11
-
${
SERVING_VERSION
}
$PWD
/serving_bin
tar
xf serving-gpu-
112
-
${
SERVING_VERSION
}
.tar.gz
mv
$PWD
/serving-gpu-
112
-
${
SERVING_VERSION
}
$PWD
/serving_bin
echo
"export SERVING_BIN=
$PWD
/serving_bin/serving"
>>
/root/.bashrc
rm
-rf
serving-gpu-
cuda11
-
${
SERVING_VERSION
}
.tar.gz
rm
-rf
serving-gpu-
112
-
${
SERVING_VERSION
}
.tar.gz
cd
-
fi
...
...
tools/generate_runtime_docker.sh
浏览文件 @
fca23995
...
...
@@ -7,10 +7,10 @@ function usage
{
echo
"usage: sh tools/generate_runtime_docker.sh --SOME_ARG ARG_VALUE"
echo
" "
;
echo
" --env : running env, cpu/cuda10.1/cuda10.2/cuda11"
;
echo
" --env : running env, cpu/cuda10.1/cuda10.2/cuda11
.2
"
;
echo
" --python : python version, 3.6/3.7/3.8 "
;
echo
" --serving : serving version(0.6.0
)"
;
echo
" --paddle : paddle version(2.1
.0)"
#echo " --serving : serving version(0.6.0/0.6.2
)";
#echo " --paddle : paddle version(2.1.0/2.2
.0)"
echo
" --image_name : image name(default serving_runtime:env-python)"
echo
" -h | --help : helper"
;
}
...
...
@@ -25,8 +25,8 @@ function parse_args
case
"
$1
"
in
--env
)
env
=
"
$2
"
;
shift
;;
--python
)
python
=
"
$2
"
;
shift
;;
--serving
)
serving
=
"
$2
"
;
shift
;;
--paddle
)
paddle
=
"
$2
"
;
shift
;;
#
--serving ) serving="$2"; shift;;
#
--paddle ) paddle="$2"; shift;;
--image_name
)
image_name
=
"
$2
"
;
shift
;;
-h
|
--help
)
usage
;
exit
;;
# quit and show usage
*
)
args+
=(
"
$1
"
)
# if no match, add it to the positional args
...
...
@@ -66,9 +66,11 @@ function run
base_image
=
"nvidia
\/
cuda:10.1-cudnn7-runtime-ubuntu16.04"
elif
[
$env
==
"cuda10.2"
]
;
then
base_image
=
"nvidia
\/
cuda:10.2-cudnn8-runtime-ubuntu16.04"
elif
[
$env
==
"cuda11"
]
;
then
base_image
=
"nvidia
\/
cuda:11.
0.3
-cudnn8-runtime-ubuntu16.04"
elif
[
$env
==
"cuda11
.2
"
]
;
then
base_image
=
"nvidia
\/
cuda:11.
2.0
-cudnn8-runtime-ubuntu16.04"
fi
python
=
"2.2.0"
serving
=
"0.7.0"
echo
"base image:
$base_image
"
echo
"named arg: python:
$python
"
echo
"named arg: serving:
$serving
"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录