Deploying Machine Learning Models in Production
Lab: Autoscaling TensorFlow model deployments with TF Serving and Kubernetes
When I reached
kubectl apply -f tf-serving/deployment.yaml
student_01_8c27e69de9f1@cloudshell:~/tfserving-gke (qwiklabs-gcp-00-c0de18497f97)$ kubectl get deployments
NAME READY UP-TO-DATE AVAILABLE AGE
image-classifier 0/1 1 0 55m
It never become READY 1/1
Log:
2024-05-05 12:58:55.867717: E tensorflow_serving/sources/storage_path/file_system_storage_path_source.cc:365] FileSystemStoragePathSource encountered a filesystem access error: Could not find base path gs://your-bucket-name/resnet_101 for servable image_classifier with error PERMISSION_DENIED: Error executing an HTTP request: HTTP response code 403 with body '{
"error": {
"code": 403,
"message": "923026286156-compute@developer.gserviceaccount.com does not have storage.objects.get access to the Google Cloud Storage object. Permission 'storage.objects.get' denied on resource (or it may not exist).",
"errors": [
{
"message": "923026286156-compute@developer.gserviceaccount.com does not have storage.objects.get access to the Google Cloud Storage object. Permission 'storage.objects.get' denied on resource (or it may not exist)."'
when reading metadata of gs://your-bucket-name/resnet_101
gs://your-bucket-name/resnet_101. <—
$ cat tf-serving/configmap.yaml
# Copyright 2020 Google Inc. All Rights Reserved.
#
# 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.
apiVersion: v1
kind: ConfigMap
metadata: # kpt-merge: /tfserving-configs
name: tfserving-configs
annotations:
internal.kpt.dev/upstream-identifier: '|ConfigMap|default|tfserving-configs'
data:
MODEL_NAME: image_classifier
MODEL_PATH: gs://your-bucket-name/resnet_101