Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
5e571c7b
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看板
提交
5e571c7b
编写于
7月 30, 2020
作者:
B
barriery
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' of
https://github.com/PaddlePaddle/Serving
into pipeline-auto-batch
上级
27ecb875
f2432229
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
48 addition
and
7 deletion
+48
-7
doc/LATEST_PACKAGES.md
doc/LATEST_PACKAGES.md
+8
-2
python/CMakeLists.txt
python/CMakeLists.txt
+1
-0
python/paddle_serving_server_gpu/__init__.py
python/paddle_serving_server_gpu/__init__.py
+10
-3
python/paddle_serving_server_gpu/gen_cuda_version.py
python/paddle_serving_server_gpu/gen_cuda_version.py
+27
-0
python/paddle_serving_server_gpu/version.py
python/paddle_serving_server_gpu/version.py
+1
-0
python/setup.py.server_gpu.in
python/setup.py.server_gpu.in
+1
-2
未找到文件。
doc/LATEST_PACKAGES.md
浏览文件 @
5e571c7b
...
...
@@ -14,11 +14,17 @@ https://paddle-serving.bj.bcebos.com/whl/paddle_serving_server-0.3.2-py2-none-an
## GPU server
### Python 3
```
https://paddle-serving.bj.bcebos.com/whl/paddle_serving_server_gpu-0.3.2-py3-none-any.whl
#cuda 9.0
https://paddle-serving.bj.bcebos.com/whl/paddle_serving_server_gpu-0.3.2.post9-py3-none-any.whl
#cuda 10.0
https://paddle-serving.bj.bcebos.com/whl/paddle_serving_server_gpu-0.3.2.post10-py3-none-any.whl
```
### Python 2
```
https://paddle-serving.bj.bcebos.com/whl/paddle_serving_server_gpu-0.3.2-py2-none-any.whl
#cuda 9.0
https://paddle-serving.bj.bcebos.com/whl/paddle_serving_server_gpu-0.3.2.post9-py2-none-any.whl
#cuda 10.0
https://paddle-serving.bj.bcebos.com/whl/paddle_serving_server_gpu-0.3.2.post10-py2-none-any.whl
```
## Client
...
...
python/CMakeLists.txt
浏览文件 @
5e571c7b
...
...
@@ -83,6 +83,7 @@ if (SERVER)
OUTPUT
${
PADDLE_SERVING_BINARY_DIR
}
/.timestamp
COMMAND cp -r
${
CMAKE_CURRENT_SOURCE_DIR
}
/paddle_serving_server_gpu/
${
PADDLE_SERVING_BINARY_DIR
}
/python/
COMMAND env
${
py_env
}
${
PYTHON_EXECUTABLE
}
paddle_serving_server_gpu/gen_cuda_version.py
${
CUDA_VERSION_MAJOR
}
COMMAND env
${
py_env
}
${
PYTHON_EXECUTABLE
}
setup.py bdist_wheel
DEPENDS
${
SERVING_SERVER_CORE
}
server_config_py_proto
${
PY_FILES
}
)
add_custom_target
(
paddle_python ALL DEPENDS
${
PADDLE_SERVING_BINARY_DIR
}
/.timestamp
)
...
...
python/paddle_serving_server_gpu/__init__.py
浏览文件 @
5e571c7b
...
...
@@ -363,7 +363,15 @@ class Server(object):
def
download_bin
(
self
):
os
.
chdir
(
self
.
module_path
)
need_download
=
False
device_version
=
"serving-gpu-"
#acquire lock
version_file
=
open
(
"{}/version.py"
.
format
(
self
.
module_path
),
"r"
)
import
re
for
line
in
version_file
.
readlines
():
if
re
.
match
(
"cuda_version"
,
line
):
cuda_version
=
line
.
split
(
"
\"
"
)[
1
]
device_version
=
"serving-gpu-cuda"
+
cuda_version
+
"-"
folder_name
=
device_version
+
serving_server_version
tar_name
=
folder_name
+
".tar.gz"
bin_url
=
"https://paddle-serving.bj.bcebos.com/bin/"
+
tar_name
...
...
@@ -372,8 +380,6 @@ class Server(object):
download_flag
=
"{}/{}.is_download"
.
format
(
self
.
module_path
,
folder_name
)
#acquire lock
version_file
=
open
(
"{}/version.py"
.
format
(
self
.
module_path
),
"r"
)
fcntl
.
flock
(
version_file
,
fcntl
.
LOCK_EX
)
if
os
.
path
.
exists
(
download_flag
):
...
...
@@ -385,6 +391,7 @@ class Server(object):
os
.
system
(
"touch {}/{}.is_download"
.
format
(
self
.
module_path
,
folder_name
))
print
(
'Frist time run, downloading PaddleServing components ...'
)
r
=
os
.
system
(
'wget '
+
bin_url
+
' --no-check-certificate'
)
if
r
!=
0
:
if
os
.
path
.
exists
(
tar_name
):
...
...
python/paddle_serving_server_gpu/gen_cuda_version.py
0 → 100644
浏览文件 @
5e571c7b
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import
sys
import
re
import
os
new_str
=
""
with
open
(
"paddle_serving_server_gpu/version.py"
,
"r"
)
as
f
:
for
line
in
f
.
readlines
():
if
re
.
match
(
"cuda_version"
,
line
):
line
=
re
.
sub
(
r
"\d+"
,
sys
.
argv
[
1
],
line
)
new_str
=
new_str
+
line
with
open
(
"paddle_serving_server_gpu/version.py"
,
"w"
)
as
f
:
f
.
write
(
new_str
)
python/paddle_serving_server_gpu/version.py
浏览文件 @
5e571c7b
...
...
@@ -15,3 +15,4 @@
serving_client_version
=
"0.3.2"
serving_server_version
=
"0.3.2"
module_proto_version
=
"0.3.2"
cuda_version
=
"9"
python/setup.py.server_gpu.in
浏览文件 @
5e571c7b
...
...
@@ -41,7 +41,6 @@ REQUIRED_PACKAGES = [
'paddle_serving_client', 'flask >= 1.1.1', 'paddle_serving_app'
]
packages=['paddle_serving_server_gpu',
'paddle_serving_server_gpu.proto',
'paddle_serving_server_gpu.pipeline',
...
...
@@ -58,7 +57,7 @@ package_dir={'paddle_serving_server_gpu':
setup(
name='paddle-serving-server-gpu',
version=serving_server_version.replace('-', ''),
version=serving_server_version.replace('-', '')
+ '.post@CUDA_VERSION_MAJOR@'
,
description=
('Paddle Serving Package for saved model with PaddlePaddle'),
url='https://github.com/PaddlePaddle/Serving',
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录