Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
d6024680
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看板
提交
d6024680
编写于
4月 28, 2020
作者:
B
barrierye
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' of
https://github.com/PaddlePaddle/Serving
into develop
上级
d11e6b6b
373433fd
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
4 deletion
+9
-4
python/paddle_serving_server_gpu/__init__.py
python/paddle_serving_server_gpu/__init__.py
+9
-4
未找到文件。
python/paddle_serving_server_gpu/__init__.py
浏览文件 @
d6024680
...
...
@@ -171,7 +171,6 @@ class Server(object):
self
.
max_body_size
=
64
*
1024
*
1024
self
.
module_path
=
os
.
path
.
dirname
(
paddle_serving_server
.
__file__
)
self
.
cur_path
=
os
.
getcwd
()
self
.
check_cuda
()
self
.
use_local_bin
=
False
self
.
gpuid
=
0
self
.
model_config_paths
=
None
# for multi-model in a workflow
...
...
@@ -211,8 +210,13 @@ class Server(object):
self
.
bin_path
=
os
.
environ
[
"SERVING_BIN"
]
def
check_cuda
(
self
):
r
=
os
.
system
(
"cat /usr/local/cuda/version.txt"
)
if
r
!=
0
:
cuda_flag
=
False
r
=
os
.
popen
(
"ldd {} | grep cudart"
.
format
(
self
.
bin_path
))
r
=
r
.
read
().
split
(
"="
)
if
len
(
r
)
>=
2
and
"cudart"
in
r
[
1
]
and
os
.
system
(
"ls /dev/ | grep nvidia > /dev/null"
)
==
0
:
cuda_flag
=
True
if
not
cuda_flag
:
raise
SystemExit
(
"CUDA not found, please check your environment or use cpu version by
\"
pip install paddle_serving_server
\"
"
)
...
...
@@ -284,7 +288,7 @@ class Server(object):
workflow_oi_config_path
=
None
if
isinstance
(
model_config_paths
,
str
):
# If there is only one model path, use the default infer_op.
# Because there are several infer_op type, we need to find
# Because there are several infer_op type, we need to find
# it from workflow_conf.
default_engine_names
=
[
'general_infer_0'
,
'general_dist_kv_infer_0'
,
...
...
@@ -415,6 +419,7 @@ class Server(object):
time
.
sleep
(
1
)
else
:
print
(
"Use local bin : {}"
.
format
(
self
.
bin_path
))
self
.
check_cuda
()
command
=
"{} "
\
"-enable_model_toolkit "
\
"-inferservice_path {} "
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录