forked from nf-core/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (31 loc) · 1.77 KB
/
Dockerfile
File metadata and controls
38 lines (31 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# devcontainers/miniconda image based on debian (bookworm)
# see tags and images: https://mcr.microsoft.com/en-us/artifact/mar/devcontainers/miniconda/tags
FROM mcr.microsoft.com/devcontainers/miniconda@sha256:b99720fe7bdce0346dc3c3ff54414ba78ff183d85a5a9d9a2e2e5775ce679347 AS build
# copy this repo at current revision
COPY . /root/nfcore-tools/
# Explicitly reinstall python 3.13 via conda
# Install uv and local nf-core tools version, and precommit hooks
RUN cd /root/nfcore-tools/ && \
conda install -y python=3.13 && \
pip install --no-cache-dir --upgrade pip uv && \
uv pip install --system --no-cache-dir . && \
rm -rf /root/.cache/pip /root/.cache/uv
# Install nextflow and nf-test via conda and run conda clean
RUN conda install -c bioconda -y nextflow nf-test && \
conda clean -afy
# Install dependencies for apptainer build and apptainer and run apt clean
RUN rm -f /etc/apt/sources.list.d/yarn.list && \
apt-get update --quiet && \
apt-get install -y curl rpm2cpio cpio && \
curl -s https://raw.githubusercontent.com/apptainer/apptainer/main/tools/install-unprivileged.sh | bash -s - /usr/local/apptainer && \
echo "PATH=/usr/local/apptainer/bin:$PATH" >> $HOME/.bashrc && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Final stage to copy only the required files after installation
FROM mcr.microsoft.com/devcontainers/base:2.1.6-debian12@sha256:15143a8c806afb8db57ae2c92876c112d7a6a1ced31cd7aa8b414201782757a4 AS final
# Copy only the conda environment and site-packages from build stage
COPY --from=build /opt/conda /opt/conda
COPY --from=build /root/nfcore-tools/nf_core /root/nfcore-tools/nf_core
# Copy aptainer install from build stage
COPY --from=build /usr/local/apptainer /usr/local/apptainer
COPY --from=build /root/.bashrc /root/.bashrc