-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathDockerfile
executable file
·35 lines (32 loc) · 1.05 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
FROM python:3.9-slim
LABEL maintainer="William Silversmith, Nico Kemnitz"
ADD ./ /igneous
RUN apt-get update \
# Build dependencies
&& apt-get install -y -qq --no-install-recommends \
git \
build-essential \
nano \
# igneous + runtime dependencies
&& cd igneous \
# numpy 1.23.0 through 1.23.2 causing issues
# with locating random module
&& pip install --no-cache-dir 'numpy<1.23.0' \
&& pip install --no-cache-dir -r requirements.txt mysql-connector-python \
&& pip install --no-cache-dir -e . \
\
# Cleanup build dependencies
&& apt-get remove --purge -y \
build-essential \
&& apt-get autoremove --purge -y \
# Cleanup apt
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
# Cleanup temporary python files
&& find /usr/local/lib/python3.9 -depth \
\( \
\( -type d -a \( -name __pycache__ \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
\) -exec rm -rf '{}' +
CMD python /igneous/igneous/task_execution.py