Skip to content

Commit ff6b70f

Browse files
committed
🚧 use micromamba
1 parent a62268a commit ff6b70f

1 file changed

Lines changed: 10 additions & 17 deletions

File tree

‎Dockerfile‎

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,34 @@
11
FROM nextstrain/base:latest
22

3+
# Install micromamba
4+
RUN curl -L "https://github.com/mamba-org/micromamba-releases/releases/latest/download/micromamba-linux-64" -o /usr/local/bin/micromamba \
5+
&& chmod +x /usr/local/bin/micromamba
6+
37
# Run the final setup as our target user for permissions reasons.
48
USER nextstrain:nextstrain
59

6-
# Install Miniforge (includes conda)
7-
RUN curl -L "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-$(uname -m).sh" -o miniforge.sh && \
8-
bash miniforge.sh -b -p /nextstrain/miniforge && \
9-
rm miniforge.sh
10-
11-
# Make conda available in PATH
12-
ENV PATH="/nextstrain/miniforge/bin:$PATH"
13-
14-
# Initialize conda for interactive shell use
15-
RUN conda init bash
16-
1710

1811
# Create conda environments
1912
# Add global write bits, similar to what's done for /nextstrain¹, but
2013
# recursively on the conda environment directory. This allows `tb-profiler
2114
# update_tbdb` to write to the directory at run time under a different UID.
2215
# ¹ <https://github.com/nextstrain/docker-base/blob/9270fb321251b298b332b648f2744308bb2d89ff/Dockerfile#L430-L431>
2316

24-
RUN conda create -y --name snippy \
17+
RUN micromamba create -y --name snippy \
2518
-c conda-forge -c bioconda \
2619
sra-tools=3.2.1 \
2720
snippy=4.6.0 \
28-
&& conda clean -afy \
21+
&& micromamba clean -afy \
2922
&& rm -rf ~/.cache \
30-
&& chmod -R a+rwXt /nextstrain/miniforge/envs/snippy
23+
&& chmod -R a+rwXt ~/.mamba/envs/snippy
3124

32-
RUN conda create -y --name tb-profiler \
25+
RUN micromamba create -y --name tb-profiler \
3326
-c conda-forge -c bioconda \
3427
sra-tools=3.2.1 \
3528
tb-profiler=6.6.3-0 \
36-
&& conda clean -afy \
29+
&& micromamba clean -afy \
3730
&& rm -rf ~/.cache \
38-
&& chmod -R a+rwXt /nextstrain/miniforge/envs/tb-profiler
31+
&& chmod -R a+rwXt ~/.mamba/envs/tb-profiler
3932

4033
# Switch back to root. The entrypoint will drop to nextstrain:nextstrain as
4134
# necessary when a container starts.

0 commit comments

Comments
 (0)