|
| 1 | +# wyoming-faster-whisper-cuda |
| 2 | + |
| 3 | +This takes the [wyoming-faster-whisper](https://github.com/rhasspy/wyoming-faster-whisper) and wraps it into an nvidia cuda supported container. |
| 4 | + |
| 5 | +**Note** This is only supported on x86_64 systems, yet. |
| 6 | + |
| 7 | +## Usage |
| 8 | + |
| 9 | +### Prerequisits |
| 10 | + |
| 11 | +1. nvidia cuda compatible gpu |
| 12 | +2. [nvidia linux drivers](https://www.nvidia.com/en-us/drivers/unix) installed on the host |
| 13 | +3. up and running [docker](https://docs.docker.com/engine/install) installation on the host |
| 14 | + |
| 15 | +### Installation |
| 16 | + |
| 17 | +1. download this repo |
| 18 | + |
| 19 | + ```shell |
| 20 | + $ git clone https://github.com/mib1185/wyoming-faster-whisper-cuda.git |
| 21 | + ``` |
| 22 | + |
| 23 | +2. `compose.yaml` file |
| 24 | + |
| 25 | + create a `compose.yaml` file, which: |
| 26 | + |
| 27 | + - builds from the local `Dockerfile` |
| 28 | + - adds the needed parameters for `model` and `language` as command line parameter |
| 29 | + - (_optional_) enables `debug` logging via command line parameter |
| 30 | + - provides a `data` volume or directory |
| 31 | + - exposes the port `10300/tcp` |
| 32 | + - maps your nvidia gpu related devices into the container (_obtain with `ls -la /dev/nvidia*`_) |
| 33 | + - (_optional_) set `restart: always` |
| 34 | + |
| 35 | + **example `compose.yaml` file** |
| 36 | + |
| 37 | + ```yaml |
| 38 | + name: wyoming |
| 39 | + services: |
| 40 | + faster-whisper-cuda: |
| 41 | + container_name: faster-whisper-cuda |
| 42 | + build: . |
| 43 | + command: "--model large --language de --debug" |
| 44 | + volumes: |
| 45 | + - ./data:/data |
| 46 | + ports: |
| 47 | + - 10300:10300/tcp |
| 48 | + devices: |
| 49 | + - /dev/nvidia-uvm:/dev/nvidia-uvm |
| 50 | + - /dev/nvidia-uvm-tools:/dev/nvidia-uvm-tools |
| 51 | + - /dev/nvidia0:/dev/nvidia0 |
| 52 | + - /dev/nvidiactl:/dev/nvidiactl |
| 53 | + restart: always |
| 54 | + ``` |
| 55 | + |
| 56 | +3. start service |
| 57 | + |
| 58 | + on first start, the docker image is build, which needs some time |
| 59 | + |
| 60 | + ```shell |
| 61 | + $ docker compose up -d |
| 62 | + ``` |
| 63 | + |
| 64 | +4. check if service is running |
| 65 | + |
| 66 | + ```shell |
| 67 | + $ docker ps |
| 68 | + CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
| 69 | + 474e37a84326 wyoming-faster-whisper-cuda "/run.sh --model lar…" 3 minutes ago Up 3 minutes 0.0.0.0:10300->10300/tcp, :::10300->10300/tcp faster-whisper-cuda |
| 70 | + ``` |
0 commit comments