-
Notifications
You must be signed in to change notification settings - Fork 13
56 lines (47 loc) · 1.7 KB
/
deployment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Deployment
env:
GCP_PROJECT_ID: "gcp-ml-172005"
GKE_CLUSTER_NAME: "tfs-cluster"
GKE_ZONE: "us-central1-c"
GKE_DEPLOYMENT_NAME: "tfs-server"
BASE_IMAGE_TAG: "gcr.io/gcp-ml-172005/tfs-resnet-cpu-opt"
MODEL_NAME: "resnet"
MODEL_RELEASE_REPO: "deep-diver/ml-deployment-k8s-tfserving"
MODEL_RELEASE_FILE: "saved_model.tar.gz"
TARGET_EXPERIMENT: "8vCPU+16GB+inter_op4"
on:
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Git
uses: actions/checkout@v2
- id: setup
name: environmental setup
uses: ./.github/actions/setup
with:
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}
GCP_PROJECT_ID: ${{ env.GCP_PROJECT_ID }}
GKE_CLUSTER_NAME: ${{ env.GKE_CLUSTER_NAME }}
GKE_CLUSTER_ZONE: ${{ env.GKE_ZONE }}
- id: build
name: build and push custom TFServing image
uses: ./.github/actions/build
with:
GCP_PROJECT_ID: ${{ env.GCP_PROJECT_ID }}
MODEL_RELEASE_REPO: ${{ env.MODEL_RELEASE_REPO }}
MODEL_RELEASE_FILE: ${{ env.MODEL_RELEASE_FILE }}
MODEL_NAME: ${{ env.MODEL_NAME }}
BASE_IMAGE_TAG: ${{ env.BASE_IMAGE_TAG }}
- id: provision
name: deploy the image to GKE cluster
uses: ./.github/actions/provision
with:
BASE_IMAGE_TAG: ${{ env.BASE_IMAGE_TAG }}
NEW_IMAGE_TAG: ${{ steps.build.outputs.NEW_IMAGE_TAG }}
TARGET_EXPERIMENT: ${{ env.TARGET_EXPERIMENT }}
GKE_DEPLOYMENT_NAME: ${{ env.GKE_DEPLOYMENT_NAME }}