-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathDockerfile
More file actions
52 lines (41 loc) · 1.21 KB
/
Dockerfile
File metadata and controls
52 lines (41 loc) · 1.21 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
FROM python:3.11-slim AS basis
# set environment varibles
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
FROM basis AS builder
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
fasttree \
libxml2 \
mafft \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
RUN pip install --upgrade pip \
&& pip install "hatch<1.17" "virtualenv<20.26"
COPY pyproject.toml .
RUN hatch dep show requirements --all > requirements.txt \
&& pip install wheel setuptools -r requirements.txt
COPY . .
RUN hatch build \
&& ls -la dist/
# Create a clean venv for runtime and install the wheel
RUN python -m venv /app \
&& /app/bin/pip install --upgrade pip wheel setuptools \
&& /app/bin/pip install -r requirements.txt \
&& /app/bin/pip install dist/*.whl
FROM basis AS runtime
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
fasttree \
libxml2 \
mafft \
mmseqs2 \
procps \
time \
&& apt-get -y autoremove \
&& apt-get -y autoclean \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /app /app
ENV PATH="/app/bin:$PATH"
RUN python -c "import FastOMA; print(FastOMA.__version__)"