-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
65 lines (47 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
59
60
61
62
63
64
65
#### Base image
#### Reference: https://github.com/root-project/root-docker/blob/master/ubuntu/Dockerfile
FROM rootproject/root:6.24.00-ubuntu20.04
#### Install binary dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
wget \
rsync \
gfortran \
build-essential \
ca-certificates \
libboost-all-dev \
python3-pip
#### Define working folders
ENV PROJECT_FOLDER "/madminer"
ENV SOFTWARE_FOLDER "/madminer/software"
#### Copy files
COPY code ${PROJECT_FOLDER}/code
COPY scripts ${PROJECT_FOLDER}/scripts
COPY requirements.txt ${PROJECT_FOLDER}
# Install Python3 dependencies
RUN python3 -m pip install --no-cache-dir --upgrade pip && \
python3 -m pip install --no-cache-dir --requirement ${PROJECT_FOLDER}/requirements.txt
#### MadGraph 5 environment variables
ENV MG_VERSION "MG5_aMC_v2.9.4"
ENV MG_FOLDER "MG5_aMC_v2_9_4"
ENV MG_FOLDER_PATH "${SOFTWARE_FOLDER}/${MG_FOLDER}"
ENV MG_BINARY_PATH "${SOFTWARE_FOLDER}/${MG_FOLDER}/bin/mg5_aMC"
#### CERN ROOT environment variables
ENV PATH $PATH:$ROOTSYS/bin
ENV LD_LIBRARY_PATH $LD_LIBRARY_PATH:$ROOTSYS/lib
#### Install MadGraph 5
RUN mkdir -p ${SOFTWARE_FOLDER} && true \
| curl -sSL "https://launchpad.net/mg5amcnlo/lts/2.9.x/+download/${MG_VERSION}.tar.gz" \
| tar -xz -C ${SOFTWARE_FOLDER}
#### Install Pythia8 and Delphes
RUN echo "n" | python3 ${MG_BINARY_PATH}
RUN echo "install pythia8" | python3 ${MG_BINARY_PATH}
RUN echo "install Delphes" | python3 ${MG_BINARY_PATH}
# Turn ON Python2 -> Python3 models conversion
RUN echo "set auto_convert_model T" | python3 ${MG_BINARY_PATH}
RUN echo "import model EWdim6-full" | python3 ${MG_BINARY_PATH}
# Delphes environment variables
ENV ROOT_INCLUDE_PATH "${ROOT_INCLUDE_PATH}:${MG_FOLDER_PATH}/Delphes/external"
#### Set working directory
WORKDIR ${PROJECT_FOLDER}