-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (38 loc) · 1.3 KB
/
Dockerfile
File metadata and controls
50 lines (38 loc) · 1.3 KB
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 python:3.8-slim-bullseye as build-stage
ARG DEBIAN_FRONTEND=noninteractive
ENV PIP_ROOT_USER_ACTION=ignore
COPY asr_client /asr-client-python/asr_client/
COPY pyproject.toml /asr-client-python/
WORKDIR /asr-client-python
# hadolint ignore=DL3005,DL3008
RUN apt-get update \
&& apt-get dist-upgrade -y \
&& apt-get install -y --no-install-recommends \
build-essential \
git \
portaudio19-dev \
libportaudio2 \
python3-pip \
python3-dev \
&& apt-get clean \
&& rm -fr /var/lib/apt/lists/* \
&& rm -fr /var/cache/apt/*
# hadolint ignore=DL3013
RUN pip install --upgrade --no-cache-dir pip \
&& pip install --no-cache-dir .
FROM python:3.8-slim-bullseye
LABEL maintainer="<jan.wozniak@techmo.pl>"
# hadolint ignore=DL3005,DL3008
RUN apt-get update \
&& apt-get dist-upgrade -y \
&& apt-get install -y --no-install-recommends \
portaudio19-dev \
libportaudio2 \
&& apt-get clean \
&& rm -fr /var/lib/apt/lists/* \
&& rm -fr /var/cache/apt/*
COPY --from=build-stage /usr/local/lib/python3.8/site-packages /usr/local/lib/python3.8/site-packages
COPY --from=build-stage /asr-client-python/asr_client/ /asr-client-python/asr_client/
WORKDIR /asr-client-python
COPY ./docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]