-
Notifications
You must be signed in to change notification settings - Fork 4
173 lines (156 loc) · 8.15 KB
/
build-images.yaml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
name: Build and push images
on:
push:
branches: [ "main" ]
env:
DOCKER_REPO_OVERRIDE: quay.io/kevent-mesh
AI_DEMO_IMAGE_TAG: main
jobs:
build:
name: build images
runs-on: ubuntu-latest
steps:
- name: Print env
run: echo "Going to push to container registry ${{ env.DOCKER_REPO_OVERRIDE }} with image tags ${{ env.AI_DEMO_IMAGE_TAG }}"
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install gsutil
run: |
pip install --no-input gsutil
# necessary for Running Red Hat Quay GitHub Action locally
- name: Install podman
if: ${{ !github.event.act }} # only run when local actions testing
run: |
apt-get update && apt-get -y install podman
- name: Download model files
run: |
gsutil cp -r gs://knative-ai-demo/kserve-models/knative_01/0001 ./services/inference-service/v1/model
ls -la ./services/inference-service/v1/model
- name: Build ai-demo-inference-service
id: build-ai-demo-inference-service
run: docker build services/inference-service/v1 --file services/inference-service/v1/Dockerfile -t ai-demo-inference-service-v1${{ env.AI_DEMO_IMAGE_TAG }}
- name: Push ai-demo-inference-service
id: push-ai-demo-inference-service
uses: redhat-actions/push-to-registry@v2
with:
image: ai-demo-inference-service-v1
tags: ${{ env.AI_DEMO_IMAGE_TAG }}
registry: ${{ env.DOCKER_REPO_OVERRIDE }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Print ai-demo-inference-service image url
run: echo "ai-demo-inference-service image pushed to ${{ steps.push-ai-demo-inference-service.outputs.registry-paths }}"
- name: Build ai-demo-upload-service
id: build-ai-demo-upload-service
run: docker build services/upload-service --file services/upload-service/Dockerfile -t ai-demo-upload-service:${{ env.AI_DEMO_IMAGE_TAG }}
- name: Push ai-demo-upload-service
id: push-ai-demo-upload-service
uses: redhat-actions/push-to-registry@v2
with:
image: ai-demo-upload-service
tags: ${{ env.AI_DEMO_IMAGE_TAG }}
registry: ${{ env.DOCKER_REPO_OVERRIDE }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Print ai-demo-upload-service image url
run: echo "ai-demo-upload-service image pushed to ${{ steps.push-ai-demo-upload-service.outputs.registry-paths }}"
- name: Build ai-demo-minio-webhook-source
id: build-ai-demo-minio-webhook-source
run: docker build services/minio-webhook-source --file services/minio-webhook-source/Dockerfile -t ai-demo-minio-webhook-source:${{ env.AI_DEMO_IMAGE_TAG }}
- name: Push ai-demo-minio-webhook-source
id: push-ai-demo-minio-webhook-source
uses: redhat-actions/push-to-registry@v2
with:
image: ai-demo-minio-webhook-source
tags: ${{ env.AI_DEMO_IMAGE_TAG }}
registry: ${{ env.DOCKER_REPO_OVERRIDE }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Print ai-demo-minio-webhook-source image url
run: echo "ai-demo-minio-webhook-source image pushed to ${{ steps.push-ai-demo-minio-webhook-source.outputs.registry-paths }}"
- name: Build ai-demo-ui-service
id: build-ai-demo-ui-service
run: docker build services/ui-service --file services/ui-service/Dockerfile -t ai-demo-ui-service:${{ env.AI_DEMO_IMAGE_TAG }}
- name: Push ai-demo-ui-service
id: push-ai-demo-ui-service
uses: redhat-actions/push-to-registry@v2
with:
image: ai-demo-ui-service
tags: ${{ env.AI_DEMO_IMAGE_TAG }}
registry: ${{ env.DOCKER_REPO_OVERRIDE }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Print ai-demo-ui-service image url
run: echo "ai-demo-ui-service image pushed to ${{ steps.push-ai-demo-ui-service.outputs.registry-paths }}"
- name: Build ai-demo-reply-service
id: build-ai-demo-reply-service
run: docker build services/reply-service --file services/reply-service/Dockerfile -t ai-demo-reply-service:${{ env.AI_DEMO_IMAGE_TAG }}
- name: Push ai-demo-reply-service
id: push-ai-demo-reply-service
uses: redhat-actions/push-to-registry@v2
with:
image: ai-demo-reply-service
tags: ${{ env.AI_DEMO_IMAGE_TAG }}
registry: ${{ env.DOCKER_REPO_OVERRIDE }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Print ai-demo-reply-service image url
run: echo "ai-demo-reply-service image pushed to ${{ steps.push-ai-demo-reply-service.outputs.registry-paths }}"
- name: Build ai-demo-analytics-service
id: build-ai-demo-analytics-service
run: docker build services/analytics-service --file services/analytics-service/Dockerfile -t ai-demo-analytics-service:${{ env.AI_DEMO_IMAGE_TAG }}
- name: Push ai-demo-analytics-service
id: push-ai-demo-analytics-service
uses: redhat-actions/push-to-registry@v2
with:
image: ai-demo-analytics-service
tags: ${{ env.AI_DEMO_IMAGE_TAG }}
registry: ${{ env.DOCKER_REPO_OVERRIDE }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Print ai-demo-analytics-service image url
run: echo "ai-demo-analytics-service image pushed to ${{ steps.push-ai-demo-analytics-service.outputs.registry-paths }}"
- name: Build ai-demo-prediction-service
id: build-ai-demo-prediction-service
run: docker build services/prediction-service --file services/prediction-service/Dockerfile -t ai-demo-prediction-service:${{ env.AI_DEMO_IMAGE_TAG }}
- name: Push ai-demo-prediction-service
id: push-ai-demo-prediction-service
uses: redhat-actions/push-to-registry@v2
with:
image: ai-demo-prediction-service
tags: ${{ env.AI_DEMO_IMAGE_TAG }}
registry: ${{ env.DOCKER_REPO_OVERRIDE }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Print ai-demo-prediction-service image url
run: echo "ai-demo-prediction-service image pushed to ${{ steps.push-ai-demo-prediction-service.outputs.registry-paths }}"
- name: Build ai-demo-feedback-service
id: build-ai-demo-feedback-service
run: docker build services/feedback-service --file services/feedback-service/Dockerfile -t ai-demo-feedback-service:${{ env.AI_DEMO_IMAGE_TAG }}
- name: Push ai-demo-feedback-service
id: push-ai-demo-feedback-service
uses: redhat-actions/push-to-registry@v2
with:
image: ai-demo-feedback-service
tags: ${{ env.AI_DEMO_IMAGE_TAG }}
registry: ${{ env.DOCKER_REPO_OVERRIDE }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Print ai-demo-feedback-service image url
run: echo "ai-demo-feedback-service image pushed to ${{ steps.push-ai-demo-feedback-service.outputs.registry-paths }}"
- name: Build ai-demo-admin-service
id: build-ai-demo-admin-service
run: docker build services/admin-service --file services/admin-service/Dockerfile -t ai-demo-admin-service:${{ env.AI_DEMO_IMAGE_TAG }}
- name: Push ai-demo-admin-service
id: push-ai-demo-admin-service
uses: redhat-actions/push-to-registry@v2
with:
image: ai-demo-admin-service
tags: ${{ env.AI_DEMO_IMAGE_TAG }}
registry: ${{ env.DOCKER_REPO_OVERRIDE }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Print ai-demo-admin-service image url
run: echo "ai-demo-admin-service image pushed to ${{ steps.push-ai-demo-admin-service.outputs.registry-paths }}"