From 75dc554371ec8d725bca10ee38297498ba4a4ded Mon Sep 17 00:00:00 2001 From: sallyom Date: Wed, 10 Apr 2024 11:02:32 -0400 Subject: [PATCH] add codegen image to ai-lab Signed-off-by: sallyom --- .github/workflows/ailab_image_build_push.yaml | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/.github/workflows/ailab_image_build_push.yaml b/.github/workflows/ailab_image_build_push.yaml index 196de8ba..a0ad82be 100644 --- a/.github/workflows/ailab_image_build_push.yaml +++ b/.github/workflows/ailab_image_build_push.yaml @@ -9,6 +9,7 @@ on: env: REGISTRY: quay.io/ai-lab CHATBOT_IMAGE_NAME: chatbot + CODEGEN_IMAGE_NAME: codegen SUMMARIZER_IMAGE_NAME: summarizer LLAMACPP_PYTHON_IMAGE_NAME: llamacpp-python LLAMACPP_PYTHON_VULKAN_IMAGE_NAME: llamacpp-python-vulkan @@ -224,6 +225,46 @@ jobs: image: ${{ steps.build_chromadb.outputs.image }} tags: ${{ steps.build_chromadb.outputs.tags }} + build-and-push-codegen-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v4.1.1 + + # required for multi-arch builds + - name: Install qemu dependency + run: | + sudo apt-get update + sudo apt-get install -y qemu-user-static + + - name: Build codegen image + id: build_codegen_image + uses: redhat-actions/buildah-build@v2.13 + with: + image: ${{ env.CODEGEN_IMAGE_NAME }} + tags: latest ${{ github.sha }} + platforms: linux/amd64, linux/arm64 + containerfiles: ./recipes/natural_language_processing/codegen/builds/Containerfile + context: recipes/natural_language_processing/codegen + + - name: Login to quay.io + uses: redhat-actions/podman-login@v1 + with: + registry: quay.io + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_PASSWORD }} + + - name: Push codegen image + id: push_codegen_image + uses: redhat-actions/push-to-registry@v2.8 + with: + registry: ${{ env.REGISTRY }} + image: ${{ steps.build_codegen_image.outputs.image }} + tags: ${{ steps.build_codegen_image.outputs.tags }} + build-and-push-chatbot-image: runs-on: ubuntu-latest permissions: