Skip to content

add whisper quadlet, move whisper model-service, update docs #1

add whisper quadlet, move whisper model-service, update docs

add whisper quadlet, move whisper model-service, update docs #1

name: Model-services build,test,push images
# Build image once the PR is merged to main branch.
on:
pull_request:
workflow_dispatch:
branches: [ main ]
push:
workflow_dispatch:
branches: [main]
permissions: write-all
jobs:
build_model_server:
runs-on: ubuntu-latest # windows-latest || macos-latest
env:
REGISTRY: quay.io/redhat-et
#GH_REGISTRY: ghcr.io
# github.repository as <account>/<repo>
MODEL_SERVICE_IMAGE: locallm-model-service
WHISPER_SERVICE_IMAGE: locallm-whisper-service
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
- name: Get changed model-service files
id: changed-files-model-service
uses: tj-actions/changed-files@v42
with:
files: |
playground/**
- name: Get changed whisper-service files
id: changed-files-whisper-service
uses: tj-actions/changed-files@v42
with:
files: |
model_servers/whisper/**
- name: Install qemu dependency
if: steps.changed-files-model-service.outputs.any_changed == 'true' || steps.changed-files-whisper-service.outputs.any_changed == 'true'
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Login Quay Container registry
if: >
(steps.changed-files-model-service.outputs.any_changed == 'true' || steps.changed-files-whisper-service.outputs.any_changed == 'true') &&
(github.event_name == 'push' || github.event_name == 'schedule') &&
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
uses: redhat-actions/podman-login@v1
with:
registry: quay.io
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build model-service
if: steps.changed-files-model-service.outputs.any_changed == 'true'
id: build_model_service_multiplatform
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.MODEL_SERVICE_IMAGE }}
tags: latest ${{ github.sha }}
platforms: linux/amd64, linux/arm64
context: playground
containerfiles: ./playground/Containerfile
- name: Push model-service image
id: push_model_service
if: >
(steps.changed-files-model-service.outputs.any_changed == 'true') &&
(github.event_name == 'push' || github.event_name == 'schedule') &&
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build_model_service_multiplatform.outputs.image }}
tags: ${{ steps.build_model_service_multiplatform.outputs.tags }}
registry: ${{ env.REGISTRY }}
- name: Build whisper-service
if: steps.changed-files-whisper-service.outputs.any_changed == 'true'
id: build_model_service_multiplatform

Check failure on line 84 in .github/workflows/build-model-server-images.yaml

View workflow run for this annotation

GitHub Actions / Model-services build,test,push images

Invalid workflow file

The workflow is not valid. .github/workflows/build-model-server-images.yaml (Line: 84, Col: 13): The identifier 'build_model_service_multiplatform' may not be used more than once within the same scope.
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.WHISPER_SERVICE_IMAGE }}
tags: latest ${{ github.sha }}
platforms: linux/amd64, linux/arm64
context: playground
containerfiles: ./playground/Containerfile
- name: Push whisper-service image
id: push_whisper_service
if: >
(steps.changed-files-whisper-service.outputs.any_changed == 'true') &&
(github.event_name == 'push' || github.event_name == 'schedule') &&
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build_whisper_service_multiplatform.outputs.image }}
tags: ${{ steps.build_whisper_service_multiplatform.outputs.tags }}
registry: ${{ env.REGISTRY }}