Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: resnet-serving-v2
labels:
app: resnet-serving
version: v2
spec:
revisionHistoryLimit: 3
strategy:
type: Recreate
template:
metadata:
labels:
app: resnet-serving
version: v2
spec:
containers:
- name: tensorflow-serving
image: masroorhasan/tensorflow-serving:cpu
command:
- tensorflow_model_server
- --port=9000
- --rest_api_port=9001
- --model_config_file=/serving/models/config/models.conf
- --file_system_poll_wait_seconds=$(FS_POLL_WAIT_SECONDS)
env:
- name: FS_POLL_WAIT_SECONDS
value: "60"
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: s3-storage-creds
key: access_id
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: s3-storage-creds
key: access_key
- name: AWS_REGION
value: us-east-2
- name: S3_ENDPOINT
value: s3.us-east-2.amazonaws.com
ports:
- containerPort: 9000
protocol: TCP
- containerPort: 9001
protocol: TCP
volumeMounts:
- mountPath: /serving/models/config
name: tf-serving-models-config
volumes:
- name: tf-serving-models-config
configMap:
name: tf-serving-models-config-v2
---
apiVersion: v1
kind: ConfigMap
metadata:
name: tf-serving-models-config-v2
data:
models.conf: |+
model_config_list: {
config: {
name: "resnet",
base_path: "s3://ml-models-repository/resnet",
model_platform: "tensorflow",
model_version_policy: {
specific: {
versions: 2
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.