|
1 | | -FROM python:3.10-buster as jre |
| 1 | +FROM python:3.12-bookworm as build |
| 2 | +WORKDIR /app |
| 3 | +RUN curl -sSL https://install.python-poetry.org | python - |
| 4 | +ENV PATH="/root/.local/bin:${PATH}" \ |
| 5 | + POETRY_CACHE_DIR='/tmp/poetry_cache' \ |
| 6 | + POETRY_NO_INTERACTION=1 \ |
| 7 | + POETRY_VIRTUALENVS_IN_PROJECT=1 \ |
| 8 | + POETRY_VIRTUALENVS_CREATE=1 |
| 9 | +COPY pyproject.toml poetry.lock ./ |
| 10 | +RUN poetry install --without dev --no-root |
| 11 | + |
| 12 | +FROM python:3.12-bookworm as base |
| 13 | +WORKDIR /app |
2 | 14 | RUN apt-get update && \ |
3 | 15 | apt-get install -y --no-install-recommends default-jre && \ |
4 | 16 | rm -rf /var/lib/apt/lists/* && \ |
5 | 17 | apt-get clean |
6 | | - |
7 | | -FROM python:3.10-buster as poetry |
8 | | -RUN curl -sSL https://install.python-poetry.org | python - |
9 | | -ENV PATH="/root/.local/bin:${PATH}" |
10 | | -COPY pyproject.toml poetry.lock workflow.py ./ |
11 | | -RUN poetry install |
12 | | - |
13 | | -FROM jre as base |
14 | 18 | COPY --from=ghcr.io/virtool/workflow-tools:2.0.1 /opt/fastqc /opt/fastqc |
15 | | -RUN chmod ugo+x /opt/fastqc/fastqc && \ |
16 | | - ln -fs /opt/fastqc/fastqc /usr/local/bin/fastqc |
17 | | -RUN curl -sSL https://install.python-poetry.org | python - |
18 | | -ENV PATH="/root/.local/bin:${PATH}" |
19 | | -COPY pyproject.toml poetry.lock workflow.py VERSION* ./ |
20 | | -RUN poetry install |
21 | | -RUN poetry export > requirements.txt |
22 | | -RUN pip install -r requirements.txt |
| 19 | +ENV VIRTUAL_ENV=/app/.venv \ |
| 20 | + PATH="/app/.venv/bin/:/opt/fastqc:${PATH}" |
| 21 | +RUN chmod ugo+x /opt/fastqc/fastqc |
| 22 | +COPY --from=build /app/.venv /app/.venv |
| 23 | +COPY workflow.py VERSION* ./ |
0 commit comments