-
Notifications
You must be signed in to change notification settings - Fork 1
/
dockerfile
37 lines (29 loc) · 1.17 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
ARG PYTHON_BASE=3.9-slim
FROM python:$PYTHON_BASE AS builder
RUN pip install -U pdm
ENV PDM_CHECK_UPDATE=false
RUN apt-get update && apt-get install -y build-essential libomp-dev libc-dev && apt-get clean && rm -rf /var/lib/apt/lists/*
ENV CC=gcc
ENV CXX=g++
ENV CPPFLAGS="-I/usr/local/include"
ENV CFLAGS="-Wall"
ENV CXXFLAGS="-Wall"
ENV LDFLAGS="-L/usr/local/lib"
RUN pip install -U pip setuptools wheel
COPY pyproject.toml pdm.lock /scikit_longitudinal/
COPY scikit_longitudinal/ /scikit_longitudinal/scikit_longitudinal/
COPY data/ /scikit_longitudinal/data/
COPY scripts/ /scikit_longitudinal/scripts/
COPY .env README.md .coveragerc /scikit_longitudinal/
WORKDIR /scikit_longitudinal
RUN pdm install --check --with :all --no-editable
FROM python:$PYTHON_BASE
COPY --from=builder /scikit_longitudinal/.venv/ /scikit_longitudinal/.venv
ENV PATH="/scikit_longitudinal/.venv/bin:$PATH"
COPY pyproject.toml pdm.lock /scikit_longitudinal/
COPY scikit_longitudinal/ /scikit_longitudinal/scikit_longitudinal/
COPY data/ /scikit_longitudinal/data/
COPY scripts/ /scikit_longitudinal/scripts/
COPY .env README.md .coveragerc /scikit_longitudinal/
WORKDIR /scikit_longitudinal
CMD ["/bin/bash"]