Skip to content

Instantly share code, notes, and snippets.

@junwan01
Created April 22, 2019 05:19
Show Gist options
  • Save junwan01/c17cd243fef4678901fa9b2ed8ce7ce1 to your computer and use it in GitHub Desktop.
Save junwan01/c17cd243fef4678901fa9b2ed8ce7ce1 to your computer and use it in GitHub Desktop.
PROJECT_ROOT=$SRC/tensorflow-serve-client
$PROJECT_ROOT/src/main/proto/tensorflow_serving/
$PROJECT_ROOT/src/main/proto/tensorflow/core/lib/core/
$PROJECT_ROOT/src/main/proto/tensorflow/core/framework/
$PROJECT_ROOT/src/main/proto/tensorflow/core/protobuf/
$PROJECT_ROOT/src/main/proto/tensorflow/core/example/
```
Note I peeled off one directory layer from the source. It is necessary to make the import statements work in those .proto files.
Here I use the rsync commands to copy files with particular extension and keep the directory structure.
```
$ mkdir -p $PROJECT_ROOT/src/main/proto/
$ rsync -arv --prune-empty-dirs --include="*/" --include='*.proto' --exclude='*' $SRC/serving/tensorflow_serving $PROJECT_ROOT/src/main/proto/
$ rsync -arv --prune-empty-dirs --include="*/" --include="tensorflow/core/lib/core/*.proto" --include='tensorflow/core/framework/*.proto' --include="tensorflow/core/example/*.proto" --include="tensorflow/core/protobuf/*.proto" --exclude='*' $SRC/tensorflow/tensorflow $PROJECT_ROOT/src/main/proto/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment