-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_proto.sh
executable file
·59 lines (53 loc) · 2.31 KB
/
build_proto.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env /usr/bin/bash
tf=tensorflow/core/framework
sv=tensorflow_serving/apis
# python3 -m pip install grpcio-tools
pushd tensorflow
find . -name "*.py" | xargs rm
popd
pushd tensorflow_serving
find . -name "*.py" | xargs rm
popd
python3 -m grpc_tools.protoc -I. --python_out=. \
tensorflow/core/framework/tensor.proto \
tensorflow/core/framework/tensor_shape.proto \
tensorflow/core/framework/resource_handle.proto \
tensorflow/core/framework/types.proto \
tensorflow/core/framework/full_type.proto \
tensorflow/core/framework/graph.proto \
tensorflow/core/framework/op_def.proto \
tensorflow/core/framework/node_def.proto \
tensorflow/core/framework/function.proto \
tensorflow/core/framework/attr_value.proto \
tensorflow/core/framework/versions.proto \
tensorflow/core/framework/variable.proto \
tensorflow/core/example/example.proto \
tensorflow/core/example/feature.proto \
tensorflow/core/protobuf/struct.proto \
tensorflow/core/protobuf/trackable_object_graph.proto \
tensorflow/core/protobuf/saved_object_graph.proto \
tensorflow/core/protobuf/saver.proto \
tensorflow/core/protobuf/error_codes.proto \
tensorflow/core/protobuf/meta_graph.proto
python3 -m grpc_tools.protoc -I. --python_out=. \
tensorflow_serving/apis/predict.proto \
tensorflow_serving/apis/classification.proto \
tensorflow_serving/apis/model.proto \
tensorflow_serving/apis/input.proto \
tensorflow_serving/apis/status.proto \
tensorflow_serving/apis/inference.proto \
tensorflow_serving/apis/regression.proto \
tensorflow_serving/apis/model_management.proto \
tensorflow_serving/apis/get_model_metadata.proto \
tensorflow_serving/apis/get_model_status.proto \
tensorflow_serving/config/file_system_storage_path_source.proto \
tensorflow_serving/config/logging_config.proto \
tensorflow_serving/config/log_collector_config.proto \
tensorflow_serving/config/model_server_config.proto
python3 -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. \
tensorflow_serving/apis/prediction_service.proto \
tensorflow_serving/apis/model_service.proto
#from tensorflow.core.framework import tensor_pb2, tensor_shape_pb2
#from tensorflow_serving.apis import predict_pb2
#from tensorflow_serving.apis import prediction_service_pb2_grpc, model_service_pb2_grpc
#from tensorflow_serving.apis import get_model_metadata_pb2, get_model_status_pb2