forked from sheynkman-lab/Long-Read-Proteogenomics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (26 loc) · 1.17 KB
/
Dockerfile
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
FROM continuumio/miniconda3:4.8.2
LABEL description="Base docker image with conda and util libraries"
ARG ENV_NAME="proteogenomics-base"
# Install mamba for faster installation in the subsequent step
# Install r-base for being able to run the install.R script
RUN conda install -c conda-forge mamba r-base -y
# Install procps so that Nextflow can poll CPU usage and
# deep clean the apt cache to reduce image/layer size
RUN apt-get update \
&& apt-get install -y procps \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
# Install the conda environment
COPY environment.yml /
RUN mamba env create --quiet --name ${ENV_NAME} --file /environment.yml && conda clean -a
# Install R packages that are possibly not available via conda
# COPY bin/install.R /
# RUN Rscript /install.R
# Add conda installation dir to PATH (instead of doing 'conda activate')
ENV PATH /opt/conda/envs/${ENV_NAME}/bin:$PATH
# Dump the details of the installed packages to a file for posterity
RUN mamba env export --name ${ENV_NAME} > ${ENV_NAME}_exported.yml
# Copy additional scripts from bin and add to PATH
RUN mkdir /opt/bin
COPY modules/*/src/* /opt/bin/
RUN chmod +x /opt/bin/*
ENV PATH="$PATH:/opt/bin/"