|
1 | | -FROM debian:buster as prep |
| 1 | +FROM debian:bookworm as bowtie2 |
2 | 2 | WORKDIR /build |
3 | | -RUN apt-get update && apt-get install -y make gcc zlib1g-dev wget unzip |
| 3 | +RUN apt-get update && apt-get install -y build-essential cmake wget zlib1g-dev |
| 4 | +RUN wget https://github.com/BenLangmead/bowtie2/archive/refs/tags/v2.5.4.tar.gz |
| 5 | +RUN tar -xvf v2.5.4.tar.gz |
| 6 | +WORKDIR bowtie2-2.5.4 |
| 7 | +RUN make |
| 8 | +RUN mkdir /build/bowtie2 |
| 9 | +RUN cp bowtie2* /build/bowtie2/ |
| 10 | + |
| 11 | +FROM debian:bookworm as pigz |
| 12 | +WORKDIR /build |
| 13 | +RUN apt-get update && apt-get install -y gcc make wget zlib1g-dev |
4 | 14 | RUN wget https://zlib.net/pigz/pigz-2.8.tar.gz && \ |
5 | 15 | tar -xzvf pigz-2.8.tar.gz && \ |
6 | 16 | cd pigz-2.8 && \ |
7 | 17 | make |
8 | | -RUN wget https://www.bioinformatics.babraham.ac.uk/projects/fastqc/fastqc_v0.11.9.zip && \ |
9 | | - unzip fastqc_v0.11.9.zip |
10 | | -RUN wget https://github.com/BenLangmead/bowtie2/releases/download/v2.3.2/bowtie2-2.3.2-legacy-linux-x86_64.zip && \ |
11 | | - unzip bowtie2-2.3.2-legacy-linux-x86_64.zip && \ |
12 | | - mkdir bowtie2 && \ |
13 | | - cp bowtie2-2.3.2-legacy/bowtie2* bowtie2 |
14 | | - |
15 | 18 |
|
16 | | -FROM python:3.10-buster as base |
| 19 | +FROM python:3.12-bookworm as deps |
17 | 20 | WORKDIR /app |
18 | | -COPY --from=prep /build/bowtie2/* /usr/local/bin/ |
19 | | -COPY --from=prep /build/FastQC /opt/fastqc |
20 | | -COPY --from=prep /build/pigz-2.8/pigz /usr/local/bin/pigz |
21 | | -RUN chmod ugo+x /opt/fastqc/fastqc && \ |
22 | | - ln -fs /opt/fastqc/fastqc /usr/local/bin/fastqc && \ |
23 | | - for file in `ls /opt/hmmer/bin`; do ln -fs /opt/hmmer/bin/${file} /usr/local/bin/${file}; done |
| 21 | +COPY --from=bowtie2 /build/bowtie2/* /usr/local/bin/ |
| 22 | +COPY --from=ghcr.io/virtool/workflow-tools:2.0.1 /opt/fastqc /opt/fastqc |
| 23 | +COPY --from=ghcr.io/virtool/workflow-tools:2.0.1 /opt/hmmer /opt/hmmer |
| 24 | +COPY --from=ghcr.io/virtool/workflow-tools:2.0.1 /usr/local/bin/pigz /usr/local/bin/ |
24 | 25 | RUN apt-get update && \ |
25 | | - apt-get install -y --no-install-recommends curl build-essential default-jre && \ |
| 26 | + apt-get install -y --no-install-recommends default-jre && \ |
26 | 27 | rm -rf /var/lib/apt/lists/* && \ |
27 | 28 | apt-get clean |
| 29 | + |
| 30 | +FROM python:3.12-bookworm as poetry |
| 31 | +WORKDIR /app |
28 | 32 | RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y |
29 | 33 | RUN curl -sSL https://install.python-poetry.org | python - |
30 | | -ENV PATH="/root/.cargo/bin:/root/.local/bin:${PATH}" |
31 | | -RUN pip install --upgrade pip |
32 | | -RUN pip install maturin==0.14.5 |
33 | | -COPY src src |
34 | | -COPY Cargo.toml Cargo.lock fixtures.py utils.py poetry.lock pyproject.toml workflow.py ./ |
35 | | -RUN maturin build --release |
36 | | -RUN poetry export > requirements.txt |
37 | | -RUN pip install -r requirements.txt |
38 | | -RUN pip install /app/target/wheels/rust_utils*.whl |
39 | | -COPY VERSION* ./ |
| 34 | +ENV PATH="/root/.local/bin:/root/.cargo/bin:${PATH}" \ |
| 35 | + POETRY_CACHE_DIR='/tmp/poetry_cache' \ |
| 36 | + POETRY_NO_INTERACTION=1 \ |
| 37 | + POETRY_VIRTUALENVS_IN_PROJECT=1 \ |
| 38 | + POETRY_VIRTUALENVS_CREATE=1 |
| 39 | +COPY Cargo.toml Cargo.lock poetry.lock pyproject.toml ./ |
| 40 | +COPY python/ ./python |
| 41 | +COPY src ./src |
| 42 | +RUN poetry install |
| 43 | +RUN poetry run maturin develop --release |
40 | 44 |
|
41 | | -FROM base as test |
| 45 | +FROM deps as base |
42 | 46 | WORKDIR /app |
43 | | -RUN poetry export --with dev > requirements.txt |
44 | | -RUN pip install -r requirements.txt |
| 47 | +ENV VIRTUAL_ENV=/app/.venv \ |
| 48 | + PATH="/app/.venv/bin:/opt/fastqc:/opt/hmmer/bin:${PATH}" |
| 49 | +RUN chmod ugo+x /opt/fastqc/fastqc |
| 50 | +COPY --from=poetry /app/.venv /app/.venv |
| 51 | +COPY --from=poetry /app/python /app/python |
| 52 | +COPY fixtures.py workflow.py VERSION* ./ |
| 53 | + |
| 54 | +FROM deps as test |
| 55 | +WORKDIR /app |
| 56 | +ENV PATH="/root/.local/bin:/root/.cargo/bin:${PATH}" |
| 57 | +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y |
| 58 | +RUN curl -sSL https://install.python-poetry.org | python - |
| 59 | +COPY Cargo.lock Cargo.toml pyproject.toml poetry.lock ./ |
| 60 | +COPY src ./src |
| 61 | +COPY python ./python |
| 62 | +RUN poetry install |
| 63 | +RUN poetry run maturin develop --release |
45 | 64 | COPY example ./example |
46 | 65 | COPY tests ./tests |
| 66 | +COPY fixtures.py workflow.py VERSION* ./ |
0 commit comments