|
1 | | -FROM python:3.10-buster as rust_utils |
| 1 | +FROM debian:buster as prep |
2 | 2 | WORKDIR /build |
3 | | -RUN apt-get update && apt-get install -y curl build-essential |
| 3 | +RUN apt-get update && apt-get install -y make gcc zlib1g-dev wget unzip |
| 4 | +RUN wget https://zlib.net/pigz/pigz-2.7.tar.gz && \ |
| 5 | + tar -xzvf pigz-2.7.tar.gz && \ |
| 6 | + cd pigz-2.7 && \ |
| 7 | + 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 | +FROM python:3.10-buster as base |
| 16 | +WORKDIR /app |
| 17 | +COPY --from=prep /build/bowtie2/* /usr/local/bin/ |
| 18 | +COPY --from=prep /build/FastQC /opt/fastqc |
| 19 | +COPY --from=prep /build/pigz-2.7/pigz /usr/local/bin/pigz |
| 20 | +RUN chmod ugo+x /opt/fastqc/fastqc && \ |
| 21 | + ln -fs /opt/fastqc/fastqc /usr/local/bin/fastqc && \ |
| 22 | + for file in `ls /opt/hmmer/bin`; do ln -fs /opt/hmmer/bin/${file} /usr/local/bin/${file}; done |
| 23 | +RUN apt-get update && \ |
| 24 | + apt-get install -y --no-install-recommends curl build-essential default-jre && \ |
| 25 | + rm -rf /var/lib/apt/lists/* && \ |
| 26 | + apt-get clean |
4 | 27 | RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y |
5 | | -ENV PATH="/root/.cargo/bin:${PATH}" |
| 28 | +RUN curl -sSL https://install.python-poetry.org | python - |
| 29 | +ENV PATH="/root/.cargo/bin:/root/.local/bin:${PATH}" |
| 30 | +RUN pip install --upgrade pip |
6 | 31 | RUN pip install maturin==0.14.5 |
7 | 32 | COPY src src |
8 | | -COPY Cargo.toml Cargo.lock ./ |
| 33 | +COPY Cargo.toml Cargo.lock fixtures.py pathoscope.py poetry.lock pyproject.toml workflow.py ./ |
9 | 34 | RUN maturin build --release |
| 35 | +RUN poetry export > requirements.txt |
| 36 | +RUN pip install -r requirements.txt |
| 37 | +RUN pip install /app/target/wheels/rust_utils*.whl |
10 | 38 |
|
11 | | -FROM virtool/workflow:5.3.0 as base |
12 | | -WORKDIR /app |
13 | | -RUN pip install --upgrade pip |
14 | | -COPY fixtures.py workflow.py pathoscope.py ./ |
15 | | -COPY --from=rust_utils /build/target/wheels/rust_utils*.whl ./ |
16 | | -RUN ls |
17 | | -RUN pip install rust_utils*.whl |
18 | 39 |
|
19 | | -FROM virtool/workflow:5.3.0 as test |
20 | | -WORKDIR /test |
21 | | -RUN pip install --upgrade pip |
22 | | -COPY pyproject.toml poetry.lock ./ |
23 | | -RUN curl -sSL https://install.python-poetry.org | python - |
24 | | -COPY tests /test/tests |
25 | | -COPY fixtures.py workflow.py pathoscope.py ./ |
26 | | -COPY --from=rust_utils /build/target/wheels/rust_utils*.whl ./ |
27 | | -RUN pip install rust_utils*.whl |
28 | | -RUN poetry install |
29 | | -RUN poetry add ./rust_utils*.whl |
30 | | -RUN ls |
31 | | -RUN poetry run pytest |
| 40 | +FROM base as test |
| 41 | +WORKDIR /app |
| 42 | +RUN poetry export --with dev > requirements.txt |
| 43 | +RUN pip install -r requirements.txt |
| 44 | +COPY tests ./tests |
| 45 | +RUN pytest |
0 commit comments