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