Skip to content

Commit 8c183af

Browse files
brillstfx-copybara
authored andcommitted
Updated the readme.md to include information about the s2t-tf_serving docker image.
Also updated the compatibility matrix. PiperOrigin-RevId: 346384167
1 parent 4f272d3 commit 8c183af

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ This will create a manylinux package in the ~/struct2tensor/dist directory.
9393

9494

9595

96-
## Creating a static library.
96+
## Creating a static library
9797

9898
In order to construct a static library for tensorflow-serving, we run:
9999

@@ -103,10 +103,31 @@ bazel build -c opt struct2tensor:prensor_kernels_and_ops
103103

104104
This can also be linked into another library.
105105

106+
## [TensorFlow Serving](https://github.com/tensorflow/serving) docker image
107+
108+
struct2tensor needs a couple of custom TensorFlow ops to function. If you train
109+
a model with struct2tensor and wants to serve it with TensorFlow Serving, the
110+
TensorFlow Serving binary needs to link with those custom ops. We have a
111+
pre-built docker image that contains such a binary. The `Dockerfile` is
112+
available at `tools/tf_serving_docker/Dockerfile`. The image is available at
113+
`gcr.io/tfx-oss-public/s2t_tf_serving`.
114+
115+
Please see the `Dockerfile` for details. But in brief, the image exposes port
116+
8500 as the gRPC endpoint and port 8501 as the REST endpoint. You can set
117+
two environment variables `MODEL_BASE_PATH` and `MODEL_NAME` to point it to
118+
your model (either mount it to the container, or put your model on GCS).
119+
It will look for a saved model at
120+
`${MODEL_BASE_PATH}/${MODEL_NAME}/${VERSION_NUMBER}`, where `VERSION_NUMBER`
121+
is an integer.
122+
123+
106124
## Compatibility
107125

108126
struct2tensor | tensorflow
109127
---------------------------------------------------------------------- | ----------
128+
[0.25.0](https://github.com/google/struct2tensor/releases/tag/v0.25.0) | 2.3.0
129+
[0.24.0](https://github.com/google/struct2tensor/releases/tag/v0.24.0) | 2.3.0
130+
[0.23.0](https://github.com/google/struct2tensor/releases/tag/v0.23.0) | 2.3.0
110131
[0.22.0](https://github.com/google/struct2tensor/releases/tag/v0.22.0) | 2.2.0
111132
[0.21.1](https://github.com/google/struct2tensor/releases/tag/v0.21.1) | 2.1.0
112133
[0.21.0](https://github.com/google/struct2tensor/releases/tag/v0.21.0) | 2.1.0

RELEASE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
## Major Features and Improvements
66

77
* Created a docker image that contains a TF model server with struct2tensor
8-
ops linked. see tools/tf_serving_docker/Dockerfile.
8+
ops linked. This docker image is available at
9+
`gcr.io/tfx-oss-public/s2t_tf_serving` .
910
* Add support for string_views for intermediate serialized protos. To use, set
1011
the option "use_string_view" in CalculateOptions to true. string_views are
1112
potentially more memory bandwidth efficient depending on the depth and

0 commit comments

Comments
 (0)