Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions vision/automl/edge_container_predict/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM tensorflow/serving:1.14.0

ENV GCS_READ_CACHE_MAX_STALENESS 300
ENV GCS_STAT_CACHE_MAX_AGE 300
ENV GCS_MATCHING_PATHS_CACHE_MAX_AGE 300

EXPOSE 8500
EXPOSE 8501
ENTRYPOINT /usr/bin/tensorflow_model_server \
--port=8500 \
--rest_api_port=8501 \
--model_base_path=/tmp/mounted_model/ \
--tensorflow_session_parallelism=0 \
--file_system_poll_wait_seconds=31540000
6 changes: 3 additions & 3 deletions vision/automl/edge_container_predict/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ $ PORT=8505
+ Step 1. Pull the Docker image.

```bash
# This is a CPU TFServing 1.12.0 with some default settings compiled from
# This is a CPU TFServing 1.14.0 with some default settings compiled from
# https://hub.docker.com/r/tensorflow/serving.
$ DOCKER_GCS_DIR=gcr.io/automl-vision-ondevice
$ CPU_DOCKER_GCS_PATH=${DOCKER_GCS_DIR}/gcloud-container-1.12.0:latest
$ DOCKER_GCS_DIR=gcr.io/cloud-devrel-public-resources
$ CPU_DOCKER_GCS_PATH=${DOCKER_GCS_DIR}/gcloud-container-1.14.0:latest
$ sudo docker pull ${CPU_DOCKER_GCS_PATH}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
IMAGE_FILE_PATH = os.path.join(os.path.dirname(__file__), 'test.jpg')
# The cpu docker gcs path is from 'Edge container tutorial'.
CPU_DOCKER_GCS_PATH = '{}'.format(
'gcr.io/automl-vision-ondevice/gcloud-container-1.12.0:latest')
'gcr.io/cloud-devrel-public-resources/gcloud-container-1.14.0:latest')
# The path of a sample saved model.
SAMPLE_SAVED_MODEL = '{}'.format(
'gs://cloud-samples-data/vision/edge_container_predict/saved_model.pb')
Expand Down