Last active
May 20, 2019 14:00
-
-
Save masroorhasan/97d2b49f1e52e629ac83660145f15cb0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: resnet-serving | |
labels: | |
app: resnet-serving | |
version: v1 | |
spec: | |
revisionHistoryLimit: 3 | |
progressDeadlineSeconds: 30 | |
strategy: | |
rollingUpdate: | |
maxUnavailable: 0 | |
type: RollingUpdate | |
template: | |
metadata: | |
labels: | |
app: resnet-serving | |
version: v1 | |
spec: | |
containers: | |
- name: tensorflow-serving | |
image: tensorflow/serving:latest | |
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 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: resnet-serving | |
labels: | |
app: resnet-serving | |
spec: | |
ports: | |
- name: grpc | |
port: 9000 | |
protocol: TCP | |
- name: rest | |
port: 9001 | |
protocol: TCP | |
selector: | |
app: resnet-serving | |
--- | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: tf-serving-models-config | |
data: | |
models.conf: |+ | |
model_config_list: { | |
config: { | |
name: "resnet", | |
base_path: "s3://ml-models-repository/resnet", | |
model_platform: "tensorflow", | |
model_version_policy: { | |
specific: { | |
versions: 1 | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment