forked from WCSim/WCSim
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.build
118 lines (104 loc) · 3.83 KB
/
Dockerfile.build
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
### Created by Dr. Benjamin Richards ([email protected]) based on docker file from Stephane Zsoldos ([email protected])
### Download base image from cern repo on docker hub
FROM cern/slc6-base:latest
### Run the following commands as super user (root):
USER root
#######################
### GCC ENVIRONMENT ###
#######################
### Required package for ROOT
RUN yum install -y \
wget \
tar \
cmake \
gcc-c++ \
gcc \
binutils \
libX11-devel \
libXpm-devel \
libXft-devel \
libXext-devel \
git \
mesa-libGL-devel \
mesa-libGLU-devel \
libXmu-devel \
libXi-devel \
expat-devel \
&& yum clean all \
&& rm -rf /var/cache/yum
### Setup environment
RUN mkdir /root/HyperK
ENV HYPERKDIR /root/HyperK
RUN export HYPERKDIR
### Downloading ROOT
RUN cd $HYPERKDIR \
&& wget https://root.cern.ch/download/root_v5.34.36.Linux-slc6-x86_64-gcc4.4.tar.gz \
&& tar -xvzf root_v5.34.36.Linux-slc6-x86_64-gcc4.4.tar.gz \
&& rm -f root_v5.34.36.Linux-slc6-x86_64-gcc4.4.tar.gz
### Downloading Geant4
RUN cd $HYPERKDIR \
&& wget http://geant4.web.cern.ch/geant4/support/source/lib4.10.1.p03/Linux-g++4.4.7-SLC6.tar.gz \
&& tar -xvzf Linux-g++4.4.7-SLC6.tar.gz \
&& rm -f Linux-g++4.4.7-SLC6.tar.gz
### Data files for Geant4
ENV G4DATA $HYPERKDIR/Geant4-10.1.3-Linux/share/Geant4-10.1.3/data
RUN cd $G4DATA \
&& wget http://geant4.web.cern.ch/geant4/support/source/G4ABLA.3.0.tar.gz \
&& tar -xvzf G4ABLA.3.0.tar.gz \
&& rm -f G4ABLA.3.0.tar.gz
RUN cd $G4DATA \
&& wget http://geant4.web.cern.ch/geant4/support/source/G4NDL.4.5.tar.gz \
&& tar -xvzf G4NDL.4.5.tar.gz \
&& rm -f G4NDL.4.5.tar.gz
RUN cd $G4DATA \
&& wget http://geant4.web.cern.ch/geant4/support/source/G4EMLOW.6.41.tar.gz \
&& tar -xvzf G4EMLOW.6.41.tar.gz \
&& rm -f G4EMLOW.6.41.tar.gz
RUN cd $G4DATA \
&& wget http://geant4.web.cern.ch/geant4/support/source/G4PhotonEvaporation.3.1.tar.gz \
&& tar -xvzf G4PhotonEvaporation.3.1.tar.gz \
&& rm -f G4PhotonEvaporation.3.1.tar.gz
RUN cd $G4DATA \
&& wget http://geant4.web.cern.ch/geant4/support/source/G4RadioactiveDecay.4.2.tar.gz \
&& tar -xvzf G4RadioactiveDecay.4.2.tar.gz \
&& rm -f G4RadioactiveDecay.4.2.tar.gz
RUN cd $G4DATA \
&& wget http://geant4.web.cern.ch/geant4/support/source/G4SAIDDATA.1.1.tar.gz \
&& tar -xvzf G4SAIDDATA.1.1.tar.gz \
&& rm -f G4SAIDDATA.1.1.tar.gz
RUN cd $G4DATA \
&& wget http://geant4.web.cern.ch/geant4/support/source/G4NEUTRONXS.1.4.tar.gz \
&& tar -xvzf G4NEUTRONXS.1.4.tar.gz \
&& rm -f G4NEUTRONXS.1.4.tar.gz
RUN cd $G4DATA \
&& wget http://geant4.web.cern.ch/geant4/support/source/G4PII.1.3.tar.gz \
&& tar -xvzf G4PII.1.3.tar.gz \
&& rm -f G4PII.1.3.tar.gz
RUN cd $G4DATA \
&& wget http://geant4.web.cern.ch/geant4/support/source/RealSurface.1.0.tar.gz \
&& tar -xvzf RealSurface.1.0.tar.gz \
&& rm -f RealSurface.1.0.tar.gz
RUN cd $G4DATA \
&& wget http://geant4.web.cern.ch/geant4/support/source/G4ENSDFSTATE.1.0.tar.gz \
&& tar -xvzf G4ENSDFSTATE.1.0.tar.gz \
&& rm -f G4ENSDFSTATE.1.0.tar.gz
### ENV Geant4
ENV G4WORKDIR $HYPERKDIR/WCSim/exe
ENV WCSIMDIR $HYPERKDIR/WCSim
ENV G4INSTALL $HYPERKDIR/Geant4-10.1.3-Linux
ENV G4LIB $G4INSTALL/lib
RUN export G4WORKDIR
RUN export WCSIMDIR
RUN export G4INSTALL
RUN export G4LIB
### build setup file
RUN cd $HYPERKDIR \
&& source $HYPERKDIR/root/bin/thisroot.sh \
&& source $G4INSTALL/bin/geant4.sh \
&& source $G4INSTALL/share/Geant4-10.1.3/geant4make/geant4make.sh \
&& echo '#!/bin/bash -x' > env-WCSim.sh \
&& echo 'source $HYPERKDIR/root/bin/thisroot.sh' >> env-WCSim.sh \
&& echo 'source $G4INSTALL/bin/geant4.sh' >> env-WCSim.sh \
&& echo 'source $G4INSTALL/share/Geant4-10.1.3/geant4make/geant4make.sh' >> env-WCSim.sh
### Open terminal
CMD ["/bin/bash"]