File tree Expand file tree Collapse file tree 4 files changed +16
-15
lines changed Expand file tree Collapse file tree 4 files changed +16
-15
lines changed Original file line number Diff line number Diff line change 1
1
PYTHON = python
2
-
3
- EDL_PROTO_FILE = elasticdl/proto/elasticdl.proto
4
-
5
2
GO_FILE_DIR = elasticdl/pkg/proto
6
- GO_PB_FILE = $(GO_FILE_DIR ) /elasticdl.pb.go
7
-
8
3
CXX = g++
9
4
CAPI_DIR = elasticdl/pkg/kernel/capi
10
5
11
- all : python_pb $( GO_PB_FILE ) kernel
6
+ all : python_pb go_pb kernel
12
7
13
- python_pb :
14
- $(PYTHON ) -m grpc_tools.protoc -I . $(EDL_PROTO_FILE ) --python_out=. --grpc_python_out=.
8
+ python_pb : elasticdl/proto/elasticdl.proto
9
+ $(PYTHON ) -m grpc_tools.protoc -I${TF_PATH} -I. \
10
+ elasticdl/proto/elasticdl.proto --python_out=. --grpc_python_out=.
15
11
16
- $( GO_PB_FILE ) : $( EDL_PROTO_FILE )
12
+ go_pb : elasticdl/proto/elasticdl.proto
17
13
mkdir -p $(GO_FILE_DIR )
18
- protoc -I . $< --go_out=plugins=grpc:.
14
+ protoc -I${TF_PATH} ${TF_PATH} /tensorflow/core/framework/types.proto --go_out=${GOPATH} /src
15
+ protoc -I${TF_PATH} ${TF_PATH} /tensorflow/core/framework/resource_handle.proto --go_out=${GOPATH} /src
16
+ protoc -I${TF_PATH} ${TF_PATH} /tensorflow/core/framework/tensor_shape.proto --go_out=${GOPATH} /src
17
+ protoc -I${TF_PATH} ${TF_PATH} /tensorflow/core/framework/tensor.proto --go_out=${GOPATH} /src
18
+ protoc -I${TF_PATH} -Ielasticdl/proto elasticdl/proto/elasticdl.proto --go_out=plugins=grpc:.
19
19
20
20
kernel :
21
21
${CXX} -O3 -std=c++11 ${CAPI_DIR} /kernel_api.cc -c -o ${CAPI_DIR} /libkernel_api.o
Original file line number Diff line number Diff line change @@ -49,11 +49,11 @@ RUN /install-protobuf.bash && rm /install-protobuf.bash
49
49
50
50
# Install elasticdl.org/elasticdl Go package
51
51
ENV ELASTICDLPATH $GOPATH/src/elasticdl.org/elasticdl
52
+ ENV TF_PATH /tmp/tensorflow
53
+ RUN cd /tmp && git clone --depth=1 https://github.com/tensorflow/tensorflow.git
52
54
COPY . /tmp/elasticdl
53
- RUN cd /tmp/elasticdl && make -f elasticdl/Makefile && \
54
- mkdir -p $ELASTICDLPATH && \
55
+ RUN cd /tmp/elasticdl && mkdir -p $ELASTICDLPATH && \
56
+ make -f elasticdl/Makefile && \
55
57
cp -r /tmp/elasticdl/elasticdl/pkg $ELASTICDLPATH && \
56
58
cd $GOPATH/src/elasticdl.org/elasticdl && \
57
- export GO111MODULE=on && \
58
- go mod init elasticdl.org/elasticdl && \
59
59
go install ./... && cd / && rm -rf /tmp/elasticdl
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ GO_MIRROR_URL=$1
6
6
7
7
curl --silent ${GO_MIRROR_URL} /go1.13.4.linux-amd64.tar.gz | tar -C /usr/local -xzf -
8
8
9
- go env -w GO111MODULE=on
10
9
go env -w GOPROXY=https://goproxy.io,direct
11
10
12
11
go get github.com/golang/protobuf/protoc-gen-go
@@ -16,5 +15,6 @@ go get golang.org/x/tools/cmd/cover
16
15
go get github.com/mattn/goveralls
17
16
go get github.com/rakyll/gotest
18
17
go get github.com/wangkuiyi/goyaccfmt
18
+ go get github.com/stretchr/testify/assert
19
19
20
20
cp $GOPATH /bin/* /usr/local/bin/
Original file line number Diff line number Diff line change 1
1
syntax = "proto3" ;
2
2
3
3
import "google/protobuf/empty.proto" ;
4
+ import "tensorflow/core/framework/tensor.proto" ;
4
5
5
6
package proto ;
6
7
option go_package = "elasticdl/pkg/proto" ;
You can’t perform that action at this time.
0 commit comments