Update docker image to use CUDA 12.3 and CUDNN 9

This commit is contained in:
Robert Dunmire III
2025-01-19 17:51:27 -05:00
committed by GitHub
parent 8b430909e2
commit 7a740e30d0
5 changed files with 82 additions and 55 deletions
+9 -44
View File
@@ -1,54 +1,19 @@
name: Publish Docker image
name: Docker Image CI
on:
release:
types: [published]
push:
branches: [ "main" ]
paths:
- Dockerfile
pull_request:
branches: [ "main" ]
paths:
- Dockerfile
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag wyoming-whisper-gpu:$(date +%s)
push_to_registries:
name: Push Docker image to multiple registries
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: |
slackr31337/wyoming-whisper-gpu
ghcr.io/${{ github.repository }}
- name: Build and push Docker images
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
+54
View File
@@ -0,0 +1,54 @@
name: Publish Docker image
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag wyoming-whisper-gpu:$(date +%s)
push_to_registries:
name: Push Docker image to multiple registries
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: |
slackr31337/wyoming-whisper-gpu
ghcr.io/${{ github.repository }}
- name: Build and push Docker images
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
+2 -2
View File
@@ -1,5 +1,5 @@
##########################################
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
FROM nvidia/cuda:12.3.2-base-ubuntu22.04
ARG WHISPER_VERSION='2.4.0'
@@ -42,7 +42,7 @@ RUN \
build-essential \
python3-dev &&\
\
rm -rf /var/lib/apt/lists/*
apt clean && rm -rf /root/.cache/* /var/lib/apt/lists/*
COPY run.sh .
+10 -8
View File
@@ -9,9 +9,7 @@ https://github.com/rhasspy/wyoming-faster-whisper
docker pull ghcr.io/slackr31337/wyoming-whisper-gpu:latest
Default model: tiny-int8
Example models:
Models:
- tiny-int8
- tiny.en
@@ -34,15 +32,16 @@ Example models:
- distil-small.en
Use environment variable to set model
Environment variables:
> MODEL=base-int8
> MODEL=base-int8 (Name of faster-whisper model to use)
>
> LANGUAGE=en
> LANGUAGE=en (Default language to set for transcription)
>
> COMPUTE_TYPE=int8 (float16, int8, etc.)
>
> BEAM_SIZE=5 (Size of beam during decoding. 0 for auto)
>
# Docker compose
@@ -52,6 +51,9 @@ Environment variables:
container_name: wyoming-whisper
environment:
- MODEL=base-int8
- LANGUAGE=en
- COMPUTE_TYPE=int8
- BEAM_SIZE=5
ports:
- 10300:10300
volumes:
+7 -1
View File
@@ -1,10 +1,16 @@
#!/usr/bin/env bash
if [ -z "${HF_HUB_CACHE}" ];then
HF_HUB_CACHE=/tmp
fi
/app/bin/python3 -m wyoming_faster_whisper \
--uri 'tcp://0.0.0.0:10300' \
--data-dir /data \
--download-dir /data \
--model "${MODEL:-tiny-int8}" \
--model "${MODEL:-auto}" \
--language "${LANGUAGE:-en}" \
--compute-type "${COMPUTE_TYPE:-int8}" \
--beam-size "${BEAM_SIZE:-5}" \
--device cuda \
"$@"