|
1 | 1 | FROM nextstrain/base:latest |
2 | 2 |
|
| 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 | + |
3 | 7 | # Run the final setup as our target user for permissions reasons. |
4 | 8 | USER nextstrain:nextstrain |
5 | 9 |
|
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 | | - |
17 | 10 |
|
18 | 11 | # Create conda environments |
19 | 12 | # Add global write bits, similar to what's done for /nextstrain¹, but |
20 | 13 | # recursively on the conda environment directory. This allows `tb-profiler |
21 | 14 | # update_tbdb` to write to the directory at run time under a different UID. |
22 | 15 | # ¹ <https://github.com/nextstrain/docker-base/blob/9270fb321251b298b332b648f2744308bb2d89ff/Dockerfile#L430-L431> |
23 | 16 |
|
24 | | -RUN conda create -y --name snippy \ |
| 17 | +RUN micromamba create -y --name snippy \ |
25 | 18 | -c conda-forge -c bioconda \ |
26 | 19 | sra-tools=3.2.1 \ |
27 | 20 | snippy=4.6.0 \ |
28 | | - && conda clean -afy \ |
| 21 | + && micromamba clean -afy \ |
29 | 22 | && rm -rf ~/.cache \ |
30 | | - && chmod -R a+rwXt /nextstrain/miniforge/envs/snippy |
| 23 | + && chmod -R a+rwXt ~/.mamba/envs/snippy |
31 | 24 |
|
32 | | -RUN conda create -y --name tb-profiler \ |
| 25 | +RUN micromamba create -y --name tb-profiler \ |
33 | 26 | -c conda-forge -c bioconda \ |
34 | 27 | sra-tools=3.2.1 \ |
35 | 28 | tb-profiler=6.6.3-0 \ |
36 | | - && conda clean -afy \ |
| 29 | + && micromamba clean -afy \ |
37 | 30 | && rm -rf ~/.cache \ |
38 | | - && chmod -R a+rwXt /nextstrain/miniforge/envs/tb-profiler |
| 31 | + && chmod -R a+rwXt ~/.mamba/envs/tb-profiler |
39 | 32 |
|
40 | 33 | # Switch back to root. The entrypoint will drop to nextstrain:nextstrain as |
41 | 34 | # necessary when a container starts. |
|
0 commit comments