Warning, /JETSCAPE/docker/Dockerfile.base is written in an unsupported language. File is not indexed.
0001 # Build from the official docker python base image, based on Debian
0002 FROM ubuntu:focal
0003 ARG DEBIAN_FRONTEND=noninteractive
0004
0005 # Install pre-reqs (commented ones are already in base image)
0006 RUN apt update && apt install -y \
0007 doxygen \
0008 emacs \
0009 ffmpeg \
0010 gsl-bin \
0011 hdf5-tools \
0012 less \
0013 libboost-all-dev \
0014 libeigen3-dev \
0015 libgsl-dev \
0016 libhdf5-serial-dev \
0017 libxpm-dev \
0018 openmpi-bin \
0019 rsync \
0020 swig \
0021 valgrind \
0022 git \
0023 vim \
0024 build-essential \
0025 cmake \
0026 wget \
0027 curl \
0028 tclsh \
0029 tcl-dev \
0030 libxft-dev \
0031 libxext-dev \
0032 libfftw3-3 \
0033 #zlib1g-dev \
0034 && rm -rf /var/lib/apt/lists/*
0035
0036 RUN apt update && apt install -y python3-pip
0037
0038 # Install additional useful python packages
0039 RUN pip3 install --upgrade pip \
0040 && pip3 install \
0041 emcee==2.2.1 \
0042 h5py \
0043 hic \
0044 hsluv \
0045 jupyter \
0046 matplotlib \
0047 nbdime \
0048 numpy \
0049 pandas \
0050 pathlib \
0051 ptemcee \
0052 pyhepmc \
0053 pyyaml \
0054 scikit-learn \
0055 scipy \
0056 seaborn \
0057 tqdm
0058
0059 # We need cmake >= 3.13.5 for the analysis package heppy
0060 # RUN cd /opt \
0061 # && wget https://github.com/Kitware/CMake/releases/download/v3.17.0/cmake-3.17.0-Linux-x86_64.sh \
0062 # && echo "y" | bash ./cmake-3.17.0-Linux-x86_64.sh \
0063 # && ln -s /opt/cmake-3.17.0-Linux-x86_64/bin/* /usr/local/bin
0064
0065 # Install ROOT6 v6-26-06 from source
0066 ENV ROOTSYS="/usr/local/root"
0067 ENV PATH="${ROOTSYS}/bin:${PATH}"
0068 ENV LD_LIBRARY_PATH="${ROOTSYS}/lib:${LD_LIBRARY_PATH}"
0069 ENV PYTHONPATH="${ROOTSYS}/lib"
0070 RUN mkdir -p ${ROOTSYS} && mkdir -p ${HOME}/root && cd ${HOME}/root \
0071 && git clone --branch v6-26-06 --depth=1 https://github.com/root-project/root.git src \
0072 && mkdir build && cd build \
0073 && cmake ../src -DCMAKE_CXX_STANDARD=14 -DCMAKE_INSTALL_PREFIX=${ROOTSYS} \
0074 && make -j8 install \
0075 && rm -r ${HOME}/root
0076
0077 # Install HepMC 3.2.5
0078 RUN curl -SL http://hepmc.web.cern.ch/hepmc/releases/HepMC3-3.2.5.tar.gz | tar -xvzC /usr/local \
0079 && cd /usr/local \
0080 && mkdir hepmc3-build \
0081 && cd hepmc3-build \
0082 && cmake ../HepMC3-3.2.5 -DCMAKE_INSTALL_PREFIX=/usr/local -DHEPMC3_ENABLE_ROOTIO=ON -DROOT_DIR=${ROOTSYS} -DHEPMC3_BUILD_EXAMPLES=ON \
0083 && make -j8 install \
0084 && rm -r /usr/local/hepmc3-build
0085 ENV LD_LIBRARY_PATH="/usr/local/lib:${LD_LIBRARY_PATH}"
0086
0087 # Install Pythia8 with HepMC3-3.2.5 (that is needed by SMASH)
0088 ARG pythiaV="8309"
0089 RUN curl -SLk http://pythia.org/download/pythia83/pythia${pythiaV}.tgz \
0090 | tar -xvzC /usr/local \
0091 && cd /usr/local/pythia${pythiaV} \
0092 && ./configure --enable-shared --prefix=/usr/local/ --with-hepmc3=/usr/local/HepMC3-3.2.5 \
0093 && make -j8 \
0094 && make -j8 install
0095
0096 # Set environmental variables for cmake to know where things are (needed for SMASH, heppy)
0097 ARG username=jetscape-user
0098 ENV JETSCAPE_DIR="/home/${username}/JETSCAPE"
0099 ENV SMASH_DIR="${JETSCAPE_DIR}/external_packages/smash/smash_code"
0100 ENV EIGEN3_ROOT /usr/include/eigen3
0101 ENV PYTHIA8DIR /usr/local/
0102 ENV PYTHIA8 /usr/local/
0103 ENV PYTHIA8_ROOT_DIR /usr/local/
0104 ENV PATH $PATH:$PYTHIA8DIR/bin
0105
0106 # Build heppy (various HEP tools via python)
0107 RUN cd / \
0108 && git clone --depth 1 --branch v1.3.8.8 https://github.com/matplo/heppy.git \
0109 && cd heppy \
0110 && ./external/fastjet/build.sh \
0111 && ./external/hepmc2/build.sh \
0112 && ./cpptools/build.sh
0113
0114 # Install environment modules
0115 RUN curl -SLk https://sourceforge.net/projects/modules/files/Modules/modules-4.5.1/modules-4.5.1.tar.gz \
0116 | tar -xvzC /usr/local \
0117 && cd /usr/local/modules-4.5.1 \
0118 && ./configure --prefix=/usr/local --modulefilesdir=/heppy/modules \
0119 && make -j8 \
0120 && make -j8 install
0121
0122 # To load heppy, from inside the container:
0123 # source /usr/local/init/profile.sh
0124 # module load heppy/1.0
0125
0126 # Set up a user group
0127 ARG id=1234
0128 RUN groupadd -g ${id} ${username} \
0129 && useradd --create-home --home-dir /home/${username} -u ${id} -g ${username} ${username}
0130 USER ${username}
0131 ENV HOME /home/${username}
0132 WORKDIR ${HOME}
0133
0134 ENTRYPOINT /bin/bash