From d23695faee4c654ac80fb7420c2296f81a58065c Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Tue, 3 Oct 2023 13:35:02 +0300 Subject: [PATCH] Build the inference service image first --- .github/workflows/build-images.yaml | 40 ++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-images.yaml b/.github/workflows/build-images.yaml index 5c6b16f1..05b43d47 100644 --- a/.github/workflows/build-images.yaml +++ b/.github/workflows/build-images.yaml @@ -16,10 +16,29 @@ jobs: with: python-version: '3.11' - - name: Download model files + - name: Install gsutil run: | pip install --no-input gsutil + - 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:main + - 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: main + registry: quay.io/kevent-mesh + 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:main @@ -109,22 +128,3 @@ jobs: 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: 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:main - - 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: main - registry: quay.io/kevent-mesh - 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 }}"