-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
67 lines (54 loc) · 1.4 KB
/
Dockerfile
File metadata and controls
67 lines (54 loc) · 1.4 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# ===================
# Stage 1: Build
# ===================
FROM python:3.11-slim AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libglib2.0-0 \
libgomp1 \
libhdf5-dev \
libnetcdf-dev \
libxml2 \
libxslt1.1 \
libssl3 \
libffi-dev \
procps \
&& rm -rf /var/lib/apt/lists/*
#RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
# locale-gen
WORKDIR /app
COPY . .
RUN pip install --no-cache-dir pip==25.1.1 && \
pip install --no-cache-dir poetry==2.1.3 && \
poetry build && \
pip install --no-cache-dir dist/*.whl && \
pip cache purge
# ===================
# Stage 2: Runtime
# ===================
FROM python:3.11-slim AS final
ENV DEBIAN_FRONTEND=noninteractive
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libglib2.0-0 \
libgomp1 \
libhdf5-dev \
libnetcdf-dev \
libxml2 \
libxslt1.1 \
libssl3 \
libffi-dev \
procps \
&& rm -rf /var/lib/apt/lists/*
#RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
# locale-gen
COPY --from=builder /usr/local /usr/local
ENV HOME=/app
ENV PEPTDEEP_HOME=/app
ENV MPLCONFIGDIR=/app/.config/matplotlib
WORKDIR /app
RUN chmod -R 755 /app
RUN python3.11 -c "import pyopenms; print('pyOpenMS imported successfully')"