forked from cshimmin/crayfis-sim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
70 lines (47 loc) · 1.68 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
66
67
68
69
70
FROM ubuntu:16.04
ENV TERM XTerm
RUN apt-get update
RUN apt-get install -y wget
### ROOT
WORKDIR /usr/opt/
RUN wget https://root.cern.ch/download/root_v6.12.06.Linux-ubuntu16-x86_64-gcc5.4.tar.gz
RUN tar xvfz root_v6.12.06.Linux-ubuntu16-x86_64-gcc5.4.tar.gz
WORKDIR /usr/opt/root
RUN apt-get install -y apt-utils cmake
RUN apt-get install -y libtbb2 g++ gcc
RUN apt-get install -y python
RUN apt-get install -y make
RUN apt-get install -y python-dev
RUN apt-get update
RUN apt-get upgrade -y binutils
### GEANT
WORKDIR /usr/opt
RUN wget http://geant4.web.cern.ch/geant4/support/source/geant4.10.01.p03.tar.gz
RUN tar -xzf geant4.10.01.p03.tar.gz
WORKDIR /usr/opt/geant_build
RUN cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr/opt/geant -DGEANT4_INSTALL_DATA=ON -DBUILD_SHARED_LIBS=ON /usr/opt/geant4.10.01.p03/
RUN make -j8
RUN make install
RUN rm -rf /usr/opt/geant_build
### Python
RUN apt-get update
RUN apt-get install -y python-pip
RUN pip install numpy
RUN apt-get install -y gdb
RUN apt-get install -y valgrind
### CRAYFIS-SIM
COPY data /usr/app/data
COPY include /usr/app/include
COPY src /usr/app/src
COPY pycraysim/pycraysim/utils /usr/app/scripts
COPY GNUmakefile /usr/app/
COPY TestEm1.cc /usr/app/
COPY gdb_commands /usr/app/
COPY seg_wrapper.sh /usr/app/
WORKDIR /usr/app/
RUN bash -c "export G4INSTALL=/usr/opt/geant/ && source /usr/opt/root/bin/thisroot.sh && source /usr/opt/geant/share/Geant4-10.1.3/geant4make/geant4make.sh && export G4G4WORKDIR=/usr/geant_workdir && make -j9"
WORKDIR /usr/app/
RUN bash -c "source /usr/opt/root/bin/thisroot.sh && python scripts/configs.py 10000 -n 3000 -j10 -o /output"
COPY run.sh /usr/app/
COPY run.py /usr/app/
CMD sh run.sh