Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
04be821f
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看板
提交
04be821f
编写于
10月 19, 2020
作者:
M
MRXLT
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
gateway compile
上级
febca8d4
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
16 addition
and
5 deletion
+16
-5
doc/COMPILE.md
doc/COMPILE.md
+2
-0
doc/COMPILE_CN.md
doc/COMPILE_CN.md
+2
-0
python/pipeline/gateway/proxy_server.go
python/pipeline/gateway/proxy_server.go
+1
-1
python/util.py
python/util.py
+8
-4
tools/serving_build.sh
tools/serving_build.sh
+3
-0
未找到文件。
doc/COMPILE.md
浏览文件 @
04be821f
...
...
@@ -75,6 +75,8 @@ export PATH=$PATH:$GOPATH/bin
## Get go packages
```
shell
go
env
-w
GO111MODULE
=
on
go
env
-w
GOPROXY
=
https://goproxy.cn,direct
go get
-u
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
go get
-u
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
go get
-u
github.com/golang/protobuf/protoc-gen-go
...
...
doc/COMPILE_CN.md
浏览文件 @
04be821f
...
...
@@ -72,6 +72,8 @@ export PATH=$PATH:$GOPATH/bin
## 获取 Go packages
```
shell
go
env
-w
GO111MODULE
=
on
go
env
-w
GOPROXY
=
https://goproxy.cn,direct
go get
-u
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
go get
-u
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
go get
-u
github.com/golang/protobuf/protoc-gen-go
...
...
python/pipeline/gateway/proxy_server.go
浏览文件 @
04be821f
...
...
@@ -25,7 +25,7 @@ import (
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"google.golang.org/grpc"
gw
"
.
/proto"
gw
"
serving-gateway
/proto"
)
//export run_proxy_server
...
...
python/util.py
浏览文件 @
04be821f
...
...
@@ -31,6 +31,10 @@ def find_package(pkgname):
def
gen_pipeline_code
(
package_name
):
ret
=
os
.
system
(
"cd {}/pipeline/gateway/ && go mod init serving-gateway"
.
format
(
package_name
))
ret
=
os
.
system
(
"cd {}/pipeline/gateway/ && go mod vendor && go mod tidy"
.
format
(
package_name
))
# pipeline service proto
protoc
.
main
((
''
,
...
...
@@ -44,8 +48,8 @@ def gen_pipeline_code(package_name):
ret
=
os
.
system
(
"cd {}/pipeline/gateway/proto/ && "
"../../../../../third_party/install/protobuf/bin/protoc -I. "
"-I$GOPATH/
src
"
"-I$GOPATH/
src/github.com/grpc-ecosystem/grpc-gateway
/third_party/googleapis "
"-I$GOPATH/
pkg/mod
"
"-I$GOPATH/
pkg/mod/github.com/grpc-ecosystem/grpc-gateway\@v1.15.2
/third_party/googleapis "
"--go_out=plugins=grpc:. "
"gateway.proto"
.
format
(
package_name
))
if
ret
!=
0
:
...
...
@@ -54,8 +58,8 @@ def gen_pipeline_code(package_name):
ret
=
os
.
system
(
"cd {}/pipeline/gateway/proto/ && "
"../../../../../third_party/install/protobuf/bin/protoc -I. "
"-I$GOPATH/
src
"
"-I$GOPATH/
src/github.com/grpc-ecosystem/grpc-gateway
/third_party/googleapis "
"-I$GOPATH/
pkg/mod
"
"-I$GOPATH/
pkg/mod/github.com/grpc-ecosystem/grpc-gateway\@v1.15.2
/third_party/googleapis "
"--grpc-gateway_out=logtostderr=true:. "
"gateway.proto"
.
format
(
package_name
))
if
ret
!=
0
:
...
...
tools/serving_build.sh
浏览文件 @
04be821f
...
...
@@ -22,6 +22,9 @@ function init() {
export
GOPATH
=
$HOME
/go
export
PATH
=
$PATH
:
$GOPATH
/bin
go
env
-w
GO111MODULE
=
on
go
env
-w
GOPROXY
=
https://goproxy.cn,direct
go get
-u
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
go get
-u
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
go get
-u
github.com/golang/protobuf/protoc-gen-go
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录