-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathDockerfile
35 lines (22 loc) · 820 Bytes
/
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
FROM python:3.8.8-slim-buster as base
# shared between builder and runtime image
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
dumb-init \
libgl1 \
libglib2.0-0 \
libsm6 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /opt/tf-bodypix
# builder
FROM base as builder
COPY requirements.build.txt ./
RUN pip install --disable-pip-version-check --no-warn-script-location --user -r requirements.build.txt
COPY requirements.txt ./
RUN pip install --disable-pip-version-check --no-warn-script-location --user -r requirements.txt
# runtime image
FROM base
COPY --from=builder /root/.local /root/.local
COPY tf_bodypix ./tf_bodypix
COPY docker/entrypoint.sh ./docker/entrypoint.sh
ENTRYPOINT ["/usr/bin/dumb-init", "--", "/opt/tf-bodypix/docker/entrypoint.sh"]