-
Notifications
You must be signed in to change notification settings - Fork 521
/
Copy pathDockerfile
42 lines (35 loc) · 1.31 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
41
42
#---
# name: wyoming-openwakeword
# group: wyoming
# requires: '>=34.1.0'
# docs: docs.md
# config: config.py
# depends: [homeassistant-base, numpy, python:3.11]
# test: test.sh
# notes: The `openWakeWord` using the `wyoming` protocol for usage with Home Assistant. Based on `https://github.com/home-assistant/addons/blob/master/openwakeword/Dockerfile` and `https://github.com/rhasspy/wyoming-openwakeword`
#---
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
ARG FORCE_BUILD=off \
WYOMING_OPENWAKEWORD_VERSION \
WYOMING_OPENWAKEWORD_BRANCH
ENV PIP_BREAK_SYSTEM_PACKAGES=1 \
WYOMING_OPENWAKEWORD_VERSION="$WYOMING_OPENWAKEWORD_VERSION" \
WYOMING_OPENWAKEWORD_BRANCH="$WYOMING_OPENWAKEWORD_BRANCH" \
OPENWAKEWORD_PORT=10400 \
OPENWAKEWORD_THRESHOLD=0.5 \
OPENWAKEWORD_TRIGGER_LEVEL=1 \
OPENWAKEWORD_PRELOAD_MODEL="ok_nabu" \
OPENWAKEWORD_CUSTOM_MODEL_DIR="/share/openwakeword" \
OPENWAKEWORD_DEBUG=true
WORKDIR /usr/src
COPY rootfs/ /
COPY models/ ${OPENWAKEWORD_CUSTOM_MODEL_DIR}/
COPY *.sh /tmp/wyoming/openwakeword/
RUN /tmp/wyoming/openwakeword/install.sh || /tmp/wyoming/openwakeword/build.sh
HEALTHCHECK --start-period=10m \
CMD echo '{ "type": "describe" }' \
| nc -w 1 localhost ${OPENWAKEWORD_PORT} \
| grep -iq "openWakeWord" \
|| exit 1
EXPOSE ${OPENWAKEWORD_PORT}/tcp