-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile_BeamRL
68 lines (48 loc) · 5.09 KB
/
Dockerfile_BeamRL
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
FROM triumfmlutils/rl_gym:v2.0.2
RUN apt-get update
RUN apt-get install -y libx11-dev libxpm-dev libxft-dev libxext-dev x11-apps libxkbcommon-dev libxkbcommon-x11-0 libxkbcommon-x11-dev libxkbcommon0 libxmu-dev
#RUN apt-get install -y libqt5core5a libqt5opengl5 libqt5opengl5-dev libqt5qml5 libqt5dbus5 libqt5gui5 qtbase5-dbg qtbase5-dev qtbase5-dev-tools qtbase5-dev-tools-dbg qt3d5-dev qtcreator libglu1-mesa-dev libgl1-mesa-dev freeglut3-dev mesa-common-dev libassimp-dev libfontconfig1 libdbus-1-3
COPY pre_config.txt .
RUN apt-get install -y libglu1-mesa-dev libgl1-mesa-dev \
freeglut3-dev mesa-common-dev libassimp-dev \
libfontconfig1 libdbus-1-3
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && \
debconf-set-selections pre_config.txt && \
echo $DEBIAN_FRONTEND $DEBCONF_NONINTERACTIVE_SEEN=true && \
debconf-show tzdata && \
apt-get install -y libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gperf bison flex
RUN apt-get install -y libxerces-c3.2 libxerces-c-dev
#RUN apt-get install -y libboost-all-dev mercurial doxygen
RUN pip install --upgrade cmake
RUN wget http://download.qt.io/official_releases/qt/5.12/5.12.3/single/qt-everywhere-src-5.12.3.tar.xz && tar -Jxf qt-everywhere-src-5.12.3.tar.xz && cd qt-everywhere-src-5.12.3 && export LD_LIBRARY_PATH=/opt/conda/lib:$LD_LIBRARY_PATH && ./configure -opensource -openssl-linked -I/opt/conda/include -L/opt/conda/lib -qt-xcb -gstreamer --prefix=/opt/conda -nomake examples -confirm-license && make -j24 && make install && cd - && rm -r qt-everywhere-src-5.12.3*
RUN wget http://mirrors.kernel.org/gnu/gsl/gsl-2.5.tar.gz && tar -xvzf gsl-2.5.tar.gz && cd gsl-2.5 && ./configure CPPFLAGS='-I/opt/conda/include -fPIC' LDFLAGS='-L/opt/conda/lib' --prefix=/opt/conda/ && make -j24 && make check && make install && cd - && rm -r gsl*
RUN wget http://www.fftw.org/fftw-3.3.8.tar.gz && tar -xvzf fftw-3.3.8.tar.gz && cd fftw-3.3.8/ && ./configure --enable-float CPPFLAGS='-I/opt/conda/include -fPIC' LDFLAGS='-L/opt/conda/lib' --prefix=/opt/conda/ && make -j24 && make check && make install && cd - && rm -r fftw*
RUN wget https://root.cern/download/root_v6.16.00.source.tar.gz && tar -xvzf root_v6.16.00.source.tar.gz && rm root_v6.16.00.source.tar.gz && mkdir root_build && cd root_build && export LD_LIBRARY_PATH=/opt/conda/lib:$LD_LIBRARY_PATH && cmake /workspace/root-6.16.00/ -DCMAKE_INSTALL_PREFIX=/opt/conda/ -DCMAKE_CXX_FLAGS='-I/opt/conda/include -L/opt/conda/lib' -LA && cmake --build . -- -j24 && cmake --build . --target install && source /opt/conda/bin/thisroot.sh && cd - && rm -r root-* root_build
#RUN wget http://apache.mirror.iweb.ca//xerces/c/3/sources/xerces-c-3.2.2.tar.gz && tar -xvzf xerces-c-3.2.2.tar.gz && mkdir xerces-c-3.2.2-build && cd xerces-c-3.2.2-build && cmake /workspace/xerces-c-3.2.2/ -DCMAKE_INSTALL_PREFIX=/opt/conda/ -DCMAKE_CXX_FLAGS='-I/opt/conda/include -L/opt/conda/lib' -LA && cmake --build . -- -j24 && cmake --build . --target install && cd - && rm -r xerces*
#RUN hg clone https://bitbucket.org/Coin3D/coin coin && mkdir coin-build && cd coin-build && cmake /workspace/coin/ -DCMAKE_INSTALL_PREFIX=/opt/conda/ -DCMAKE_CXX_FLAGS='-I/opt/conda/include -L/opt/conda/lib' -LA
# install GEANT4
RUN wget http://geant4-data.web.cern.ch/geant4-data/releases/geant4.10.05.p01.tar.gz && tar -xvzf geant4.10.05.p01.tar.gz && mkdir geant4.10.05.p01-build && cd geant4.10.05.p01-build/ && cmake /workspace/geant4.10.05.p01 -DCMAKE_INSTALL_PREFIX=/opt/conda/ -DCMAKE_CXX_FLAGS='-I/opt/conda/include -L/opt/conda/lib' -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DGEANT4_USE_SYSTEM_EXPAT=OFF -DCMAKE_BUILD_TYPE=Release -DGEANT4_USE_RAYTRACER_X11=ON -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_USE_QT=ON -DGEANT4_INSTALL_DATA=ON -LA && cmake --build . -- -j24 && cmake --build . --target install && cd - && rm -r geant4*
#cp /workspace/geant4.10.05.p01/source/interfaces/basic/include/G4UIQt.hh /opt/conda/include/Geant4/ && rm -r geant4*
##################
#install TRANSOPTR
##################
#install dependencies
RUN apt-get install -y gnuplot gfortran git
#clone repo using ssh key
RUN mkdir /root/.ssh/
ADD id_rsa /root/.ssh/id_rsa
# Create known_hosts
RUN touch /root/.ssh/known_hosts
# Add gitlab key
RUN ssh-keyscan gitlab.triumf.ca >> /root/.ssh/known_hosts
#clone
RUN git clone [email protected]:beamphys/transoptr.git && cd transoptr && git checkout c88896e69277db48c77a5a567a17ade0f168650c && rm /root/.ssh/id_rsa
#set env variable
ENV OPTRDIR /workspace/transoptr
RUN mkdir /root/bin
RUN ln -s $OPTRDIR/envelope.gnu /root/bin/mac-default
#compile
RUN cd $OPTRDIR/example/OLISSupernanogan && $OPTRDIR/runoptr.sh -c
##export LD_LIBRARY_PATH=/opt/conda/lib:$LD_LIBRARY_PATH
##for f in g4bl g4bldata g4blgui g4blmpi g4bltest; do mv $f/CMakelists.txt $f/CMakeLists.txt -v; done
# cmake /workspace/root-6.16.00/ -DCMAKE_INSTALL_PREFIX=/opt/conda/ -DCMAKE_CXX_FLAGS='-I/opt/conda/include/ -L/opt/conda/lib/' -LA