forked from dusty-nv/jetson-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (32 loc) · 1.03 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#---
# name: wyoming-whisper
# group: wyoming
# config: config.py
# depends: [homeassistant-base, cuda, cudnn, python:3.11, faster-whisper]
# test: test.sh
# requires: '>=34.1.0'
# docs: docs.md
# notes: The `faster-whisper` using the `wyoming` protocol for usage with Home Assistant. Based on `https://github.com/home-assistant/addons/blob/master/whisper/Dockerfile`
#---
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
ARG WYOMING_WHISPER_VERSION
ENV PIP_BREAK_SYSTEM_PACKAGES=1 \
WYOMING_WHISPER_VERSION="$WYOMING_WHISPER_VERSION" \
HF_HUB_CACHE=/share/whisper \
WHISPER_PORT=10300 \
WHISPER_MODEL="tiny-int8" \
WHISPER_BEAM_SIZE="1" \
WHISPER_LANGUAGE="en" \
WHISPER_DEBUG="true"
COPY rootfs/ /
COPY build.sh /tmp/wyoming/build_wyoming-faster-whisper.sh
WORKDIR /usr/src
RUN /tmp/wyoming/build_wyoming-faster-whisper.sh
EXPOSE ${WHISPER_PORT}/tcp
HEALTHCHECK --start-period=10m \
CMD echo '{ "type": "describe" }' \
| nc -w 1 localhost ${WHISPER_PORT} \
| grep -q "faster-whisper" \
|| exit 1
CMD /init