Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
24c18024
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看板
提交
24c18024
编写于
2月 12, 2020
作者:
D
Dong Daxiang
提交者:
GitHub
2月 12, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #163 from MRXLT/fix-2
fix python api
上级
eb5cdbda
945a035e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
11 addition
and
9 deletion
+11
-9
Dockerfile
Dockerfile
+1
-3
python/examples/imdb/test_server.py
python/examples/imdb/test_server.py
+3
-1
python/paddle_serving_client/__init__.py
python/paddle_serving_client/__init__.py
+1
-1
python/paddle_serving_server/__init__.py
python/paddle_serving_server/__init__.py
+6
-4
未找到文件。
Dockerfile
浏览文件 @
24c18024
FROM
centos:centos6.10
RUN
export
http_proxy
=
http://172.19.56.199:3128
\
&&
export
https_proxy
=
http://172.19.56.199:3128
\
&&
yum
-y
install
wget
\
RUN
yum
-y
install
wget
\
&&
wget http://people.centos.org/tru/devtools-2/devtools-2.repo
-O
/etc/yum.repos.d/devtoolset-2.repo
\
&&
yum
-y
install
devtoolset-2-gcc devtoolset-2-gcc-c++ devtoolset-2-binutils
\
&&
source
/opt/rh/devtoolset-2/enable
\
...
...
python/examples/imdb/test_server.py
浏览文件 @
24c18024
...
...
@@ -14,6 +14,8 @@ op_seq_maker.add_op(general_infer_op)
server
=
Server
()
server
.
set_op_sequence
(
op_seq_maker
.
get_op_sequence
())
server
.
set_num_threads
(
12
)
server
.
load_model_config
(
sys
.
argv
[
1
])
server
.
prepare_server
(
workdir
=
"work_dir1"
,
port
=
9292
,
device
=
"cpu"
)
port
=
int
(
sys
.
argv
[
2
])
server
.
prepare_server
(
workdir
=
"work_dir1"
,
port
=
port
,
device
=
"cpu"
)
server
.
run_server
()
python/paddle_serving_client/__init__.py
浏览文件 @
24c18024
...
...
@@ -104,7 +104,7 @@ class Client(object):
predictor_sdk
=
SDKConfig
()
predictor_sdk
.
set_server_endpoints
(
endpoints
)
sdk_desc
=
predictor_sdk
.
gen_desc
()
self
.
client_handle_
.
create_predictor_by_desc
(
sdk_desc
)
self
.
client_handle_
.
create_predictor_by_desc
(
sdk_desc
.
SerializeToString
()
)
def
get_feed_names
(
self
):
return
self
.
feed_names_
...
...
python/paddle_serving_server/__init__.py
浏览文件 @
24c18024
...
...
@@ -176,7 +176,7 @@ class Server(object):
def
run_server
(
self
):
# just run server with system command
# currently we do not load cube
command
=
"/home/
users/dongdaxiang/github_develop
/Serving/build_server/core/general-server/serving"
\
command
=
"/home/
xulongteng/github
/Serving/build_server/core/general-server/serving"
\
" -enable_model_toolkit "
\
"-inferservice_path {} "
\
"-inferservice_file {} "
\
...
...
@@ -187,7 +187,8 @@ class Server(object):
"-resource_path {} "
\
"-resource_file {} "
\
"-workflow_path {} "
\
"-workflow_file {} "
.
format
(
"-workflow_file {} "
\
"-bthread_concurrency {} "
.
format
(
self
.
workdir
,
self
.
infer_service_fn
,
self
.
max_concurrency
,
...
...
@@ -196,8 +197,9 @@ class Server(object):
self
.
reload_interval_s
,
self
.
workdir
,
self
.
resource_fn
,
self
.
workdir
,
self
.
workflow_fn
)
self
.
workdir
,
self
.
workflow_fn
,
self
.
num_threads
,)
os
.
system
(
command
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录