forked from dusty-nv/jetson-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (35 loc) · 1.25 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
43
44
#---
# name: wyoming-openwakeword
# group: wyoming
# requires: '>=34.1.0'
# docs: docs.md
# config: config.py
# depends: [homeassistant-base, 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 WYOMING_OPENWAKEWORD_VERSION
# Specify the shell with desired options
SHELL ["/bin/bash", "-euxo", "pipefail"]
ENV PIP_BREAK_SYSTEM_PACKAGES=1 \
WYOMING_OPENWAKEWORD_VERSION="$WYOMING_OPENWAKEWORD_VERSION" \
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 build.sh /tmp/wyoming/build_openwakeword.sh
RUN /tmp/wyoming/build_openwakeword.sh
HEALTHCHECK --start-period=10m \
CMD echo '{ "type": "describe" }' \
| nc -w 1 localhost ${OPENWAKEWORD_PORT} \
| grep -iq "openWakeWord" \
|| exit 1
EXPOSE ${OPENWAKEWORD_PORT}/tcp
CMD /init