-
Notifications
You must be signed in to change notification settings - Fork 28
/
Dockerfile
45 lines (40 loc) · 1.21 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
45
ARG BUILD_FROM
FROM ${BUILD_FROM}
ARG BUILD_ARCH
# Set shell
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Install snowboy
WORKDIR /usr/src
ARG WYOMING_SNOWBOY_VERSION
ARG SNOWMAN_ENROLL_VERSION
ENV PIP_BREAK_SYSTEM_PACKAGES=1
RUN \
apt-get update \
&& apt-get install -y --no-install-recommends \
python3 \
python3-pip \
python3-dev \
build-essential \
swig \
libatlas-base-dev \
curl \
&& pip3 install --no-cache-dir -U \
setuptools \
wheel \
&& pip3 install --no-cache-dir \
"wyoming-snowboy @ https://github.com/rhasspy/wyoming-snowboy/archive/refs/tags/v${WYOMING_SNOWBOY_VERSION}.tar.gz" \
&& curl --location --output - \
"https://github.com/rhasspy/snowman-enroll/releases/download/v${SNOWMAN_ENROLL_VERSION}/snowman_enroll-${BUILD_ARCH}.tar.gz" | \
tar -xzf - \
&& apt-get remove --yes build-essential swig \
&& apt-get autoclean \
&& apt-get purge \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /
COPY src/train.py /usr/src/
COPY rootfs /
HEALTHCHECK --start-period=10m \
CMD echo '{ "type": "describe" }' \
| nc -w 1 localhost 10400 \
| grep -iq "snowboy" \
|| exit 1