Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
14ca3b96
S
Serving
项目概览
PaddlePaddle
/
Serving
接近 2 年 前同步成功
通知
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看板
未验证
提交
14ca3b96
编写于
1月 29, 2021
作者:
J
Jiawei Wang
提交者:
GitHub
1月 29, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1003 from wangjiawei04/v0.4.1
cherry-pick 1002 1001
上级
02a3a150
73792442
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
14 addition
and
4 deletion
+14
-4
python/examples/encryption/README.md
python/examples/encryption/README.md
+1
-0
python/examples/encryption/README_CN.md
python/examples/encryption/README_CN.md
+1
-1
python/paddle_serving_server/serve.py
python/paddle_serving_server/serve.py
+5
-2
python/paddle_serving_server_gpu/__init__.py
python/paddle_serving_server_gpu/__init__.py
+3
-0
python/paddle_serving_server_gpu/serve.py
python/paddle_serving_server_gpu/serve.py
+4
-1
未找到文件。
python/examples/encryption/README.md
浏览文件 @
14ca3b96
...
@@ -12,6 +12,7 @@ sh get_data.sh
...
@@ -12,6 +12,7 @@ sh get_data.sh
## Encrypt Model
## Encrypt Model
The
`paddlepaddle`
package is used in this example, you may need to download the corresponding package(
`pip install paddlepaddle`
).
```
```
python encrypt.py
python encrypt.py
```
```
...
...
python/examples/encryption/README_CN.md
浏览文件 @
14ca3b96
...
@@ -11,7 +11,7 @@ sh get_data.sh
...
@@ -11,7 +11,7 @@ sh get_data.sh
```
```
## 模型加密
## 模型加密
本示例中使用了
`paddlepaddle`
包中的模块,需要进行下载(
`pip install paddlepaddle`
)。
```
```
python encrypt.py
python encrypt.py
```
```
...
...
python/paddle_serving_server/serve.py
浏览文件 @
14ca3b96
...
@@ -23,9 +23,12 @@ import json
...
@@ -23,9 +23,12 @@ import json
import
base64
import
base64
import
time
import
time
from
multiprocessing
import
Process
from
multiprocessing
import
Process
from
web_service
import
WebService
,
port_is_available
from
.
web_service
import
WebService
,
port_is_available
from
flask
import
Flask
,
request
from
flask
import
Flask
,
request
from
BaseHTTPServer
import
BaseHTTPRequestHandler
,
HTTPServer
if
sys
.
version_info
.
major
==
2
:
from
BaseHTTPServer
import
BaseHTTPRequestHandler
,
HTTPServer
elif
sys
.
version_info
.
major
==
3
:
from
http.server
import
BaseHTTPRequestHandler
,
HTTPServer
def
parse_args
():
# pylint: disable=doc-string-missing
def
parse_args
():
# pylint: disable=doc-string-missing
...
...
python/paddle_serving_server_gpu/__init__.py
浏览文件 @
14ca3b96
...
@@ -771,6 +771,9 @@ class MultiLangServer(object):
...
@@ -771,6 +771,9 @@ class MultiLangServer(object):
self
.
concurrency_
=
concurrency
self
.
concurrency_
=
concurrency
self
.
bserver_
.
set_max_concurrency
(
concurrency
)
self
.
bserver_
.
set_max_concurrency
(
concurrency
)
def
set_device
(
self
,
device
=
"cpu"
):
self
.
device
=
device
def
set_num_threads
(
self
,
threads
):
def
set_num_threads
(
self
,
threads
):
self
.
worker_num_
=
threads
self
.
worker_num_
=
threads
self
.
bserver_
.
set_num_threads
(
threads
)
self
.
bserver_
.
set_num_threads
(
threads
)
...
...
python/paddle_serving_server_gpu/serve.py
浏览文件 @
14ca3b96
...
@@ -25,7 +25,10 @@ import time
...
@@ -25,7 +25,10 @@ import time
from
multiprocessing
import
Pool
,
Process
from
multiprocessing
import
Pool
,
Process
from
paddle_serving_server_gpu
import
serve_args
from
paddle_serving_server_gpu
import
serve_args
from
flask
import
Flask
,
request
from
flask
import
Flask
,
request
from
BaseHTTPServer
import
BaseHTTPRequestHandler
,
HTTPServer
if
sys
.
version_info
.
major
==
2
:
from
BaseHTTPServer
import
BaseHTTPRequestHandler
,
HTTPServer
elif
sys
.
version_info
.
major
==
3
:
from
http.server
import
BaseHTTPRequestHandler
,
HTTPServer
def
start_gpu_card_model
(
index
,
gpuid
,
port
,
args
):
# pylint: disable=doc-string-missing
def
start_gpu_card_model
(
index
,
gpuid
,
port
,
args
):
# pylint: disable=doc-string-missing
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录