Skip to content

Commit 6d5524d

Browse files
committed
updated to removed clair3
1 parent 19d1e4e commit 6d5524d

File tree

2 files changed

+51
-16
lines changed

2 files changed

+51
-16
lines changed

Dockerfile

Lines changed: 51 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,67 @@
1-
FROM mambaorg/micromamba:1.5.8
1+
# start with an image with conda installed
2+
FROM condaforge/mambaforge AS compile-image
3+
4+
WORKDIR /data
25

36
COPY . ./fieldbioinformatics/
47

5-
USER root
8+
# check for updates
9+
RUN apt-get update -y && \
10+
apt-get upgrade -y && \
11+
apt install build-essential -y --no-install-recommends && \
12+
apt-get clean && apt-get autoclean
13+
14+
# copy in artic
15+
RUN cd /data/fieldbioinformatics && \
16+
mamba install conda -n base -c conda-forge -c defaults -c bioconda && \
17+
mamba env create -f /data/fieldbioinformatics/environment.yml
18+
19+
# Make RUN commands use the new environment:
20+
SHELL ["conda", "run", "-n", "artic", "/bin/bash", "-c"]
21+
RUN mamba install -c conda-forge -n artic python=3.9 conda-pack && \
22+
cd /data/fieldbioinformatics && \
23+
pip install .
624

7-
RUN apt-get update && apt-get install -y --no-install-recommends build-essential wget procps
25+
# Use conda-pack to create a standalone enviornment
26+
# in /venv:
27+
RUN conda list && \
28+
conda-pack -n artic -o /tmp/env.tar && \
29+
mkdir /venv && cd /venv && tar xf /tmp/env.tar && \
30+
rm /tmp/env.tar && /venv/bin/conda-unpack
831

9-
USER $MAMBA_USER
32+
SHELL ["/bin/bash", "-c"]
1033

11-
COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yml /tmp/env.yml
34+
RUN conda clean --all &&\
35+
conda remove --name artic --all
1236

13-
RUN sed -i 's/name: artic/name: base/' /tmp/env.yml
37+
# build artic
38+
WORKDIR /data/fieldbioinformatics
39+
RUN source /venv/bin/activate && pip install --user --no-cache-dir . \
40+
&& pip uninstall -y tensorflow keras pyabpoa \
41+
&& conda install -y -c conda-forge tensorflow~=2.11 keras~=2.11
1442

15-
RUN micromamba install --yes --file /tmp/env.yml && \
16-
micromamba clean --all --yes
43+
# build image
44+
FROM debian:bullseye-slim AS runtime-image
1745

18-
ARG MAMBA_DOCKERFILE_ACTIVATE=1
46+
COPY --from=compile-image /root/.local /root/.local
47+
ENV PATH=/root/.local/bin:$PATH
1948

20-
USER root
49+
# Copy /venv from the previous stage:
50+
COPY --from=compile-image /venv /venv
2151

22-
RUN python3 -m pip install ./fieldbioinformatics
52+
# check for updates
53+
RUN apt-get update -y && \
54+
apt-get upgrade -y && \
55+
apt install build-essential -y --no-install-recommends && \
56+
apt install -y procps && \
57+
apt-get clean && apt-get autoclean
2358

24-
RUN pip uninstall -y tensorflow keras pyabpoa \
25-
&& micromamba install -y -c conda-forge -c bioconda tensorflow=2.11 keras=2.11
59+
WORKDIR /data
2660

27-
USER $MAMBA_USER
61+
SHELL ["/bin/bash", "-c"]
2862

29-
ENTRYPOINT ["/usr/local/bin/_entrypoint.sh"]
63+
# to allow streamed log output
64+
ENV PYTHONUNBUFFERED=1
65+
ENV PATH=/venv/bin:$PATH
3066

3167
CMD ["/bin/bash"]

environment.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ dependencies:
99
- bcftools
1010
- biopython
1111
- bwa
12-
- clair3
1312
- clint
1413
- htslib
1514
- minimap2

0 commit comments

Comments
 (0)