-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
50 lines (35 loc) · 1.42 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
46
47
48
49
50
FROM ubuntu:eoan as build
ENV LANG C.UTF-8
RUN apt-get update && \
apt-get install --no-install-recommends --yes \
python3 python3-dev python3-setuptools python3-pip python3-venv \
build-essential portaudio19-dev
ENV APP_DIR=/usr/lib/rhasspy-microphone-pyaudio-hermes
ENV BUILD_DIR=/build
# Copy source
COPY rhasspymicrophone_pyaudio_hermes/ ${BUILD_DIR}/rhasspymicrophone_pyaudio_hermes/
# Autoconf
COPY m4/ ${BUILD_DIR}/m4/
COPY configure config.sub config.guess \
install-sh missing aclocal.m4 \
Makefile.in setup.py requirements.txt rhasspy-microphone-pyaudio-hermes.in \
${BUILD_DIR}/
RUN cd ${BUILD_DIR} && \
./configure --prefix=${APP_DIR}
COPY VERSION README.md LICENSE ${BUILD_DIR}/
RUN cd ${BUILD_DIR} && \
make && \
make install
# Strip binaries and shared libraries
RUN (find ${APP_DIR} -type f \( -name '*.so*' -or -executable \) -print0 | xargs -0 strip --strip-unneeded -- 2>/dev/null) || true
# -----------------------------------------------------------------------------
FROM ubuntu:eoan as run
ENV LANG C.UTF-8
RUN apt-get update && \
apt-get install --yes --no-install-recommends \
python3 libpython3.7 \
libportaudio2
ENV APP_DIR=/usr/lib/rhasspy-microphone-pyaudio-hermes
COPY --from=build ${APP_DIR}/ ${APP_DIR}/
COPY --from=build /build/rhasspy-microphone-pyaudio-hermes /usr/bin/
ENTRYPOINT ["bash", "/usr/bin/rhasspy-microphone-pyaudio-hermes"]