-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (23 loc) · 812 Bytes
/
Dockerfile
File metadata and controls
30 lines (23 loc) · 812 Bytes
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
FROM python:3.7.9-slim-buster
LABEL maintainer="[email protected]"
RUN set -eux; \
apt-get update; \
apt-get upgrade -y; \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
VOLUME ["/data", "/results"]
WORKDIR /app
COPY entrypoint.sh /entrypoint.sh
COPY requirements.txt /tmp/
# install requirements and cleanup afterwards (also removes tests and cached cython files of the dependencies)
RUN set -eux; \
pip install --no-cache-dir -r /tmp/requirements.txt; \
find /usr/local -depth \
\( \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
\) -exec rm -rf '{}' +; \
rm -rf /tmp/* /var/tmp/* ~/.cache/pip
ENTRYPOINT [ "/entrypoint.sh" ]
CMD [ "execute-algorithm" ]