Skip to content

Commit

Permalink
Merge pull request #26 from beeldengeluid/22-gpu-docker
Browse files Browse the repository at this point in the history
22 gpu docker
  • Loading branch information
greenw0lf authored May 8, 2024
2 parents 430d5a6 + 8753f65 commit ea90ceb
Show file tree
Hide file tree
Showing 5 changed files with 350 additions and 336 deletions.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
FROM docker.io/python:3.10
FROM nvidia/cuda:12.2.2-cudnn8-runtime-ubuntu22.04

# Create dirs for:
# - Injecting config.yml: /root/.DANE
# - Mount point for input & output files: /mnt/dane-fs
# - Storing the source code: /src
RUN mkdir /root/.DANE /mnt/dane-fs /src /data

RUN apt-get update && \
apt-get install -y python3-pip python3-dev python-is-python3 && \
rm -rf /var/lib/apt/lists/*

WORKDIR /src

ENV POETRY_NO_INTERACTION=1 \
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,12 @@ The Whisper model version can be adjusted in the `config.yml` file by editing th
|`medium`|769 M|
|`large`|1550 M|
|`large-v2`|1550 M|
|`large-v3`|1550 M|
|`large-v3`|1550 M|

We recommend version `large-v2` as it performs better in most cases than `large-v3`.

## Running via Docker using a CUDA compatible GPU

To run it using a GPU via Docker, check [the instructions from the dane-example-worker](https://github.com/beeldengeluid/dane-example-worker/wiki/Containerization#running-the-container-locally-using-cuda-compatible-gpu).

Make sure to replace `dane-example-worker` in the `docker run` command with `dane-whisper-asr-worker`.
2 changes: 1 addition & 1 deletion config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ OUTPUT:
S3_FOLDER_IN_BUCKET: folder # folder within the bucket
WHISPER_ASR_SETTINGS:
WORD_TIMESTAMPS: True
DEVICE: cpu # "cpu" to run on CPU, otherwise "cuda" to run on GPU
DEVICE: cuda # "cpu" to run on CPU, otherwise "cuda" to run on GPU
VAD: True # whether to use voice activity detection (VAD) or not
MODEL_VERSION: large-v2 # check the README for available options
BEAM_SIZE: 5
Expand Down
Loading

0 comments on commit ea90ceb

Please sign in to comment.