Skip to content
Snippets Groups Projects
genie-root5:3.0.2 2.57 KiB
Newer Older
Vladimir Kulikovskiy's avatar
Vladimir Kulikovskiy committed
FROM docker.km3net.de/base/centos-full:7
 MAINTAINER Vladimir Kulikovskiy <vkulikovskiy@km3net.de>

 RUN yum install -y log4cpp log4cpp-devel libxml2 libxml2-devel gsl gsl-devel
#lhapdf
 RUN cd / && curl -L https://lhapdf.hepforge.org/downloads/\?f\=lhapdf-5.9.1.tar.gz > lhapdf-5.9.1.tar.gz && \
    tar xzvf lhapdf-5.9.1.tar.gz && cd lhapdf-5.9.1 && \
    ./configure --prefix=/usr/local && make && make install
#Pythia 6.4.28 (using script in GENIE)
#https://root-forum.cern.ch/t/root-with-pythia6-and-pythia8/19211/4
 RUN cd / && wget https://root.cern.ch/download/pythia6.tar.gz && \
    tar zxvf pythia6.tar.gz && rm -rf pythia6.tar.gz && \
    wget --no-check-certificate http://www.hepforge.org/archive/pythia6/pythia-6.4.28.f.gz && \
    gzip -d pythia-6.4.28.f.gz && mv pythia-6.4.28.f pythia6/pythia6428.f && rm -rf pythia6/pythia6416.f && \
    mv pythia6 pythia6428 && cd pythia6428 && \
    ./makePythia6.linuxx8664 && echo "export PYTHIA6=/pythia6428" > /etc/profile.d/genie.sh

#ROOT with PYTHIA (Pythia libs need to be compiled)
#remove existing ROOT installation
#ROOT5
 RUN source /etc/profile.d/genie.sh && cd / && rm -rf /usr/local/root && \
    curl -L https://root.cern.ch/download/root_v5.34.36.source.tar.gz > root.tar.gz && \
    tar xvf root.tar.gz -C /usr/local/ && rm root.tar.gz && cd /usr/local/root && \
    ./configure --fail-on-missing --with-pythia6-libdir=$PYTHIA6 --enable-pythia6 --enable-cxx11 && \
    make && \
    echo "cd /usr/local/root && source bin/thisroot.sh && cd -" >> /etc/profile.d/root_env.sh && cd
        
Vladimir Kulikovskiy's avatar
Vladimir Kulikovskiy committed
#GENIE
#it looks for libgfortran in /usr/lib64, otherwise linking will fail
 RUN ln -s /lib64/libgfortran.so.3 /usr/lib64/libgfortran.so
 RUN cd / && mkdir genie && cd genie && git clone https://github.com/GENIE-MC/Generator.git genie_generator &&  \
    cd genie_generator && git checkout R-3_00_02 && \ 
    echo "export GENIE=/genie/genie_generator" >> /etc/profile.d/genie.sh && \
    echo "export PATH=$PATH:$GENIE/bin" >> /etc/profile.d/genie.sh && \
    echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GENIE/lib" >> /etc/profile.d/genie.sh && \
    source /etc/profile.d/root_env.sh && source /etc/profile.d/genie.sh && cd $GENIE && \
Vladimir Kulikovskiy's avatar
Vladimir Kulikovskiy committed
    ./configure && make && make install
#GENIE REWEIGHT
 RUN cd /genie && git clone https://github.com/GENIE-MC/Reweight.git genie_reweight && \
    cd genie_reweight && git checkout R-1_00_00 && \
    echo "export GENIE_REWEIGHT=/genie/genie_reweight" >> /etc/profile.d/genie.sh && \
    source /etc/profile.d/root_env.sh && source /etc/profile.d/genie.sh && cd /genie/genie_reweight \
Vladimir Kulikovskiy's avatar
Vladimir Kulikovskiy committed
    ./configure && make && make install