File tree Expand file tree Collapse file tree 3 files changed +32
-4
lines changed
vision/automl/edge_container_predict Expand file tree Collapse file tree 3 files changed +32
-4
lines changed Original file line number Diff line number Diff line change 1+ # Copyright 2019 Google LLC
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ FROM tensorflow/serving:1.14.0
16+
17+ ENV GCS_READ_CACHE_MAX_STALENESS 300
18+ ENV GCS_STAT_CACHE_MAX_AGE 300
19+ ENV GCS_MATCHING_PATHS_CACHE_MAX_AGE 300
20+
21+ EXPOSE 8500
22+ EXPOSE 8501
23+ ENTRYPOINT /usr/bin/tensorflow_model_server \
24+ --port=8500 \
25+ --rest_api_port=8501 \
26+ --model_base_path=/tmp/mounted_model/ \
27+ --tensorflow_session_parallelism=0 \
28+ --file_system_poll_wait_seconds=31540000
Original file line number Diff line number Diff line change @@ -18,10 +18,10 @@ $ PORT=8505
1818+ Step 1. Pull the Docker image.
1919
2020``` bash
21- # This is a CPU TFServing 1.12 .0 with some default settings compiled from
21+ # This is a CPU TFServing 1.14 .0 with some default settings compiled from
2222# https://hub.docker.com/r/tensorflow/serving.
23- $ DOCKER_GCS_DIR=gcr.io/automl-vision-ondevice
24- $ CPU_DOCKER_GCS_PATH=${DOCKER_GCS_DIR} /gcloud-container-1.12 .0:latest
23+ $ DOCKER_GCS_DIR=gcr.io/cloud-devrel-public-resources
24+ $ CPU_DOCKER_GCS_PATH=${DOCKER_GCS_DIR} /gcloud-container-1.14 .0:latest
2525$ sudo docker pull ${CPU_DOCKER_GCS_PATH}
2626```
2727
Original file line number Diff line number Diff line change 4646IMAGE_FILE_PATH = os .path .join (os .path .dirname (__file__ ), 'test.jpg' )
4747# The cpu docker gcs path is from 'Edge container tutorial'.
4848CPU_DOCKER_GCS_PATH = '{}' .format (
49- 'gcr.io/automl-vision-ondevice /gcloud-container-1.12 .0:latest' )
49+ 'gcr.io/cloud-devrel-public-resources /gcloud-container-1.14 .0:latest' )
5050# The path of a sample saved model.
5151SAMPLE_SAVED_MODEL = '{}' .format (
5252 'gs://cloud-samples-data/vision/edge_container_predict/saved_model.pb' )
You can’t perform that action at this time.
0 commit comments