-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathDockerfile
45 lines (31 loc) · 1.02 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
FROM ghcr.io/timeeval/python3-base:0.3.0 as base
LABEL maintainer="[email protected]"
ENV ALGORITHM_MAIN="/app/algorithm.py"
# install C dependencies
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends libfftw3-3; \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Separate build image!
#----------------------------
FROM base as build
# install build dependencies
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends libfftw3-dev build-essential; \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN python -m venv --system-site-packages /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
# build and install matrix profile lib
COPY matrix_profile /matrix_profile
RUN cd /matrix_profile && python setup.py install
#----------------------------
FROM base
ENV PATH="/opt/venv/bin:$PATH"
COPY --from=build /opt/venv /opt/venv
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY SAND.py .
COPY algorithm.py .