forked from zibraproject/zika-pipeline
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
51 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,67 @@ | ||
FROM mambaorg/micromamba:1.5.8 | ||
# start with an image with conda installed | ||
FROM condaforge/mambaforge AS compile-image | ||
|
||
WORKDIR /data | ||
|
||
COPY . ./fieldbioinformatics/ | ||
|
||
USER root | ||
# check for updates | ||
RUN apt-get update -y && \ | ||
apt-get upgrade -y && \ | ||
apt install build-essential -y --no-install-recommends && \ | ||
apt-get clean && apt-get autoclean | ||
|
||
# copy in artic | ||
RUN cd /data/fieldbioinformatics && \ | ||
mamba install conda -n base -c conda-forge -c defaults -c bioconda && \ | ||
mamba env create -f /data/fieldbioinformatics/environment.yml | ||
|
||
# Make RUN commands use the new environment: | ||
SHELL ["conda", "run", "-n", "artic", "/bin/bash", "-c"] | ||
RUN mamba install -c conda-forge -n artic python=3.9 conda-pack && \ | ||
cd /data/fieldbioinformatics && \ | ||
pip install . | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends build-essential wget procps | ||
# Use conda-pack to create a standalone enviornment | ||
# in /venv: | ||
RUN conda list && \ | ||
conda-pack -n artic -o /tmp/env.tar && \ | ||
mkdir /venv && cd /venv && tar xf /tmp/env.tar && \ | ||
rm /tmp/env.tar && /venv/bin/conda-unpack | ||
|
||
USER $MAMBA_USER | ||
SHELL ["/bin/bash", "-c"] | ||
|
||
COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yml /tmp/env.yml | ||
RUN conda clean --all &&\ | ||
conda remove --name artic --all | ||
|
||
RUN sed -i 's/name: artic/name: base/' /tmp/env.yml | ||
# build artic | ||
WORKDIR /data/fieldbioinformatics | ||
RUN source /venv/bin/activate && pip install --user --no-cache-dir . \ | ||
&& pip uninstall -y tensorflow keras pyabpoa \ | ||
&& conda install -y -c conda-forge tensorflow~=2.11 keras~=2.11 | ||
|
||
RUN micromamba install --yes --file /tmp/env.yml && \ | ||
micromamba clean --all --yes | ||
# build image | ||
FROM debian:bullseye-slim AS runtime-image | ||
|
||
ARG MAMBA_DOCKERFILE_ACTIVATE=1 | ||
COPY --from=compile-image /root/.local /root/.local | ||
ENV PATH=/root/.local/bin:$PATH | ||
|
||
USER root | ||
# Copy /venv from the previous stage: | ||
COPY --from=compile-image /venv /venv | ||
|
||
RUN python3 -m pip install ./fieldbioinformatics | ||
# check for updates | ||
RUN apt-get update -y && \ | ||
apt-get upgrade -y && \ | ||
apt install build-essential -y --no-install-recommends && \ | ||
apt install -y procps && \ | ||
apt-get clean && apt-get autoclean | ||
|
||
RUN pip uninstall -y tensorflow keras pyabpoa \ | ||
&& micromamba install -y -c conda-forge -c bioconda tensorflow=2.11 keras=2.11 | ||
WORKDIR /data | ||
|
||
USER $MAMBA_USER | ||
SHELL ["/bin/bash", "-c"] | ||
|
||
ENTRYPOINT ["/usr/local/bin/_entrypoint.sh"] | ||
# to allow streamed log output | ||
ENV PYTHONUNBUFFERED=1 | ||
ENV PATH=/venv/bin:$PATH | ||
|
||
CMD ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ dependencies: | |
- bcftools | ||
- biopython | ||
- bwa | ||
- clair3 | ||
- clint | ||
- htslib | ||
- minimap2 | ||
|