-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
58 lines (50 loc) · 1.86 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
###############################################################################
#
# Docker image recipe for containerised warlock analyses
#
# AUTHOR: Maciek Bak
# CONTACT: [email protected]
#
###############################################################################
##### BASE IMAGE #####
FROM continuumio/miniconda3:23.3.1-0
##### METADATA #####
LABEL base.image="continuumio/miniconda3:23.3.1-0"
LABEL version="1.0.0"
LABEL software="warlock"
LABEL software.version="$(cat VERSION)"
LABEL software.description="Warlock is a snakemake workflow to spawn multiple demons (deme-based oncology models)."
LABEL software.website="https://github.com/AngryMaciek/warlock"
LABEL software.license="Apache-2.0"
LABEL software.tags="Computational Biology, Mathematical Oncology, Snakemake"
LABEL maintainer="Maciek Bak"
LABEL maintainer.email="[email protected]"
LABEL maintainer.organisation="City, University of London"
##### ENVIROMENTAL VARIABLES #####
ENV LANG C.UTF-8
ENV SHELL /bin/bash
##### COPY REPOSITORY #####
WORKDIR warlock
COPY . .
RUN apt-get update && apt-get upgrade -y \
&& apt-get install -y locales \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
##### INSTALL MAMBA + BUILD CONDA ENV #####
RUN \
conda install mamba -c conda-forge --yes \
&& mamba env create --file environment.yml \
&& conda clean --all --yes \
&& echo "conda activate warlock" >> ~/.bashrc
##### COMPILE DEMON #####
RUN \
/opt/conda/envs/warlock/bin/g++ \
resources/demon_model/src/demon.cpp \
-o resources/demon_model/bin/demon \
-I /opt/conda/envs/warlock/include \
-lm
##### INSTALL DEMONANALYSIS #####
RUN \
bash -c "/opt/conda/envs/warlock/bin/Rscript -e \"devtools::install('resources/demonanalysis', upgrade=FALSE)\""