Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/config/image/whisperx/ec2-amzn2023.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
image:
name: "whisperx-ec2-amzn2023"
description: "WhisperX ASR (VAD + faster-whisper transcription + wav2vec2 alignment + pyannote diarization) for EC2 instances (AL2023, GPU)"

metadata:
framework: "whisperx"
framework_version: "3.8.6"
os_version: "amzn2023"
customer_type: "ec2"
arch_type: "x86"
device_type: "gpu"
job_type: "inference"
prod_image: "whisperx:3.8.6-ec2-gpu-cuda-amzn2023"

build:
dockerfile: "docker/whisperx/Dockerfile.amzn2023"
target: "whisperx-ec2-amzn2023"
python_version: "3.12"
cuda_version: "12.8.2"
torch_version: "2.8.0"
torchaudio_version: "2.8.0"
whisperx_version: "3.8.6"
faster_whisper_version: "1.2.1"
ctranslate2_version: "4.8.0"
pyannote_audio_version: "4.0.7"
fastapi_version: "0.121.0"
uvicorn_version: "0.40.0"
python_multipart_version: "0.0.30"
dlc_major_version: "1"
dlc_minor_version: "0"

release:
release: false
force_release: false
public_registry: false
private_registry: false
enable_soci: false
environment: "production"
39 changes: 39 additions & 0 deletions .github/config/image/whisperx/sagemaker-amzn2023.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
image:
name: "whisperx-sagemaker-amzn2023"
description: "WhisperX ASR (VAD + faster-whisper transcription + wav2vec2 alignment + pyannote diarization) for SageMaker (AL2023, GPU)"

metadata:
framework: "whisperx"
framework_version: "3.8.6"
os_version: "amzn2023"
customer_type: "sagemaker"
platform: "sagemaker"
arch_type: "x86"
device_type: "gpu"
job_type: "inference"
prod_image: "whisperx:3.8.6-sagemaker-gpu-cuda-amzn2023"

build:
dockerfile: "docker/whisperx/Dockerfile.amzn2023"
target: "whisperx-sagemaker-amzn2023"
python_version: "3.12"
cuda_version: "12.8.2"
torch_version: "2.8.0"
torchaudio_version: "2.8.0"
whisperx_version: "3.8.6"
faster_whisper_version: "1.2.1"
ctranslate2_version: "4.8.0"
pyannote_audio_version: "4.0.7"
fastapi_version: "0.121.0"
uvicorn_version: "0.40.0"
python_multipart_version: "0.0.30"
dlc_major_version: "1"
dlc_minor_version: "0"

release:
release: false
force_release: false
public_registry: false
private_registry: false
enable_soci: false
environment: "production"
215 changes: 215 additions & 0 deletions .github/workflows/whisperx.pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
name: "Pipeline - WhisperX"

on:
workflow_call:
inputs:
config-file:
description: "Path to image config YAML"
required: true
type: string
tag-suffix:
description: "CI tag suffix (run_id or pr-NUMBER)"
required: true
type: string
build:
description: "Whether to build the image (false = skip build, test against prod)"
required: false
type: boolean
default: true
run-sanity-test:
description: "Run sanity tests"
required: false
type: boolean
default: true
run-unit-test:
description: "Run CPU-only unit tests"
required: false
type: boolean
default: true
run-security-test:
description: "Run security tests"
required: false
type: boolean
default: true
run-telemetry-test:
description: "Run telemetry tests"
required: false
type: boolean
default: true
run-ec2-test:
description: "Run EC2 functional tests (gated to ec2 configs)"
required: false
type: boolean
default: true
run-sagemaker-test:
description: "Run SageMaker endpoint tests (gated to sagemaker configs)"
required: false
type: boolean
default: true
release:
description: "Run release job after tests pass"
required: false
type: boolean
default: false
outputs:
image-uri:
description: "Built image URI (empty if build was skipped)"
value: ${{ jobs.build.outputs.image-uri }}

jobs:
ci-config:
runs-on: ubuntu-latest
outputs:
customer-type: ${{ steps.parse.outputs.customer-type }}
steps:
- uses: actions/checkout@v6
- id: parse
run: |
echo "customer-type=$(yq '.metadata.customer_type' '${{ inputs.config-file }}')" >> $GITHUB_OUTPUT

build:
if: ${{ inputs.build }}
concurrency:
group: ${{ github.workflow }}-build-${{ inputs.config-file }}-${{ github.ref }}
cancel-in-progress: true
runs-on:
- codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
fleet:x86-build-runner
buildspec-override:true
timeout-minutes: 120
outputs:
image-uri: ${{ steps.build.outputs.image-uri }}
steps:
- uses: actions/checkout@v6
- id: build
uses: ./.github/actions/build-image
with:
config-file: ${{ inputs.config-file }}
aws-account-id: ${{ vars.CI_AWS_ACCOUNT_ID }}
aws-region: ${{ vars.AWS_REGION }}
tag-suffix: ${{ inputs.tag-suffix }}

sanity-test:
if: ${{ always() && !failure() && !cancelled() && inputs.run-sanity-test }}
needs: [build]
concurrency:
group: ${{ github.workflow }}-sanity-test-${{ inputs.config-file }}-${{ github.ref }}
cancel-in-progress: true
uses: ./.github/workflows/_reusable.sanity-tests.yml
with:
config-file: ${{ inputs.config-file }}
image-uri: ${{ needs.build.outputs.image-uri || '' }}

unit-test:
# CPU-only, image-independent tests — no `needs: [build]` so they run
# immediately in parallel with the image build and still report even if the
# build fails (they never consume the image; image-uri is unused).
if: ${{ inputs.run-unit-test }}
concurrency:
group: ${{ github.workflow }}-unit-test-${{ inputs.config-file }}-${{ github.ref }}
cancel-in-progress: true
uses: ./.github/workflows/whisperx.tests-unit.yml
with:
config-file: ${{ inputs.config-file }}
image-uri: ''

security-test:
if: ${{ always() && !failure() && !cancelled() && inputs.run-security-test }}
needs: [build]
concurrency:
group: ${{ github.workflow }}-security-test-${{ inputs.config-file }}-${{ github.ref }}
cancel-in-progress: true
uses: ./.github/workflows/_reusable.security-tests.yml
with:
config-file: ${{ inputs.config-file }}
image-uri: ${{ needs.build.outputs.image-uri || '' }}

telemetry-test:
if: ${{ always() && !failure() && !cancelled() && inputs.run-telemetry-test }}
needs: [build]
concurrency:
group: ${{ github.workflow }}-telemetry-test-${{ inputs.config-file }}-${{ github.ref }}
cancel-in-progress: false
uses: ./.github/workflows/_reusable.telemetry-tests.yml
with:
config-file: ${{ inputs.config-file }}
image-uri: ${{ needs.build.outputs.image-uri || '' }}

ec2-test:
if: ${{ always() && !failure() && !cancelled() && inputs.run-ec2-test && needs.ci-config.outputs.customer-type == 'ec2' }}
needs: [build, ci-config]
concurrency:
group: ${{ github.workflow }}-ec2-test-${{ inputs.config-file }}-${{ github.ref }}
cancel-in-progress: true
uses: ./.github/workflows/whisperx.tests-ec2.yml
with:
config-file: ${{ inputs.config-file }}
image-uri: ${{ needs.build.outputs.image-uri || '' }}

sagemaker-test:
if: ${{ always() && !failure() && !cancelled() && inputs.run-sagemaker-test && needs.ci-config.outputs.customer-type == 'sagemaker' }}
needs: [build, ci-config]
concurrency:
group: ${{ github.workflow }}-sagemaker-test-${{ inputs.config-file }}-${{ github.ref }}
cancel-in-progress: false
uses: ./.github/workflows/whisperx.tests-sagemaker.yml
with:
config-file: ${{ inputs.config-file }}
image-uri: ${{ needs.build.outputs.image-uri || '' }}

release-gate:
if: >-
github.ref == 'refs/heads/main' &&
(contains(github.workflow_ref, '.autorelease') || contains(github.workflow_ref, '.dispatch-release')) &&
!contains(github.workflow_ref, '.pr') &&
inputs.release &&
!failure() && !cancelled() &&
needs.build.result == 'success'
needs: [build, sanity-test, unit-test, security-test, telemetry-test, ec2-test, sagemaker-test]
runs-on: ubuntu-latest
outputs:
should-release: ${{ steps.check.outputs.should-release }}
release-spec: ${{ steps.spec.outputs.release-spec }}
environment: ${{ steps.check.outputs.environment }}
steps:
- uses: actions/checkout@v6
- id: check
run: |
SHOULD_RELEASE=$(yq '.release.release' "${{ inputs.config-file }}")
ENVIRONMENT=$(yq '.release.environment' "${{ inputs.config-file }}")
echo "should-release=${SHOULD_RELEASE}" >> $GITHUB_OUTPUT
echo "environment=${ENVIRONMENT}" >> $GITHUB_OUTPUT
- id: spec
if: steps.check.outputs.should-release == 'true'
uses: ./.github/actions/generate-release-spec
with:
config-file: ${{ inputs.config-file }}

release:
if: ${{ !failure() && !cancelled() && needs.release-gate.outputs.should-release == 'true' }}
needs: [build, release-gate]
uses: ./.github/workflows/_reusable.release-image.yml
with:
source-image-uri: ${{ needs.build.outputs.image-uri }}
release-spec: ${{ needs.release-gate.outputs.release-spec }}
environment: ${{ needs.release-gate.outputs.environment }}
aws-region: ${{ vars.AWS_REGION }}
secrets: inherit

notify-failure:
if: >-
failure() &&
github.ref == 'refs/heads/main' &&
(contains(github.workflow_ref, '.autorelease') || contains(github.workflow_ref, '.dispatch-release')) &&
!contains(github.workflow_ref, '.pr') &&
inputs.release
needs: [build, sanity-test, unit-test, security-test, telemetry-test, ec2-test, sagemaker-test, release-gate, release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/notify-slack-failure
with:
webhook-url: ${{ secrets.SLACK_RELEASE_FAILURE_WEBHOOK_URL }}
workflow-name: ${{ github.workflow }}
config-file: ${{ inputs.config-file }}
run-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
Loading
Loading