From 41a1c96e06970f89f03dc68a14c472a79ac84427 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Fri, 4 Sep 2020 14:19:41 -0400 Subject: [PATCH] Update other GPU containers --- tools/singularity/ubuntu18.04_amd_rocm.def | 76 +++++++-- tools/singularity/ubuntu18.04_gpu.def | 5 +- tools/singularity/ubuntu18.04_nvidia.def | 4 +- tools/singularity/ubuntu20.04_amd_rocm.def | 170 +++++++++++++++++++++ tools/singularity/ubuntu20.04_gpu.def | 5 +- tools/singularity/ubuntu20.04_nvidia.def | 87 +++++++++++ 6 files changed, 334 insertions(+), 13 deletions(-) create mode 100644 tools/singularity/ubuntu20.04_amd_rocm.def create mode 100644 tools/singularity/ubuntu20.04_nvidia.def diff --git a/tools/singularity/ubuntu18.04_amd_rocm.def b/tools/singularity/ubuntu18.04_amd_rocm.def index 4c58f690aa..a93a4af55b 100644 --- a/tools/singularity/ubuntu18.04_amd_rocm.def +++ b/tools/singularity/ubuntu18.04_amd_rocm.def @@ -2,7 +2,7 @@ BootStrap: docker From: ubuntu:18.04 %environment - export PATH=$PATH:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64 + export PATH=/usr/lib/ccache:${PATH}:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64 %post export DEBIAN_FRONTEND=noninteractive @@ -25,7 +25,8 @@ From: ubuntu:18.04 build-essential apt-get install --no-install-recommends -y software-properties-common - + add-apt-repository ppa:openkim/latest + apt-get update apt-get install --no-install-recommends -y \ bc \ build-essential \ @@ -41,7 +42,6 @@ From: ubuntu:18.04 gfortran \ git \ hdf5-tools \ - kmod \ less \ libblas-dev \ libeigen3-dev \ @@ -52,12 +52,15 @@ From: ubuntu:18.04 libhwloc-dev \ libjpeg-dev \ liblapack-dev \ + libnetcdf-dev \ libomp-dev \ libopenblas-dev \ libnuma-dev \ libpng-dev \ libproj-dev \ libvtk6-dev \ + libyaml-dev \ + libzstd-dev \ make \ mpi-default-bin \ mpi-default-dev \ @@ -79,30 +82,85 @@ From: ubuntu:18.04 wget \ xxd \ valgrind \ - gdb + gdb \ + zstd \ + libkim-api-dev \ + openkim-models + ########################################################################### + # ROCm hipCUB + ########################################################################### + export PATH=$PATH:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64 - git clone -b master-rocm-3.5 https://github.com/ROCmSoftwarePlatform/hipCUB.git + git clone -b rocm-3.7.x https://github.com/ROCmSoftwarePlatform/hipCUB.git mkdir hipCUB/build cd hipCUB/build CXX=hipcc cmake -D BUILD_TEST=off .. - make -j4 + make make package make install - # clean cache - rm -rf /var/lib/apt/lists/* + + ########################################################################### + # KIM-API + ########################################################################### + + # workaround for installing files in /usr/share/doc inside of a container + sed -i 's/path-exclude=\/usr\/share\/doc/#path-exclude=\/usr\/share\/doc/g' /etc/dpkg/dpkg.cfg.d/excludes + apt-get install -y libkim-api-doc + sed -i 's/#path-exclude=\/usr\/share\/doc/path-exclude=\/usr\/share\/doc/g' /etc/dpkg/dpkg.cfg.d/excludes + + # install KIM models + KIM_API_EXAMPLES=/usr/share/doc/libkim-api-dev/examples + gunzip $KIM_API_EXAMPLES/portable-models/LennardJones612_UniversalShifted__MO_959249795837_003/LennardJones612_UniversalShifted.params.gz + gunzip $KIM_API_EXAMPLES/model-drivers/ex_model_driver_P_LJ/ex_model_driver_P_LJ.f90.gz + + kim-api-collections-management install system $KIM_API_EXAMPLES/model-drivers/LennardJones612__MD_414112407348_003 + kim-api-collections-management install system $KIM_API_EXAMPLES/model-drivers/ex_model_driver_P_LJ + kim-api-collections-management install system $KIM_API_EXAMPLES/portable-models/LennardJones_Ar + kim-api-collections-management install system $KIM_API_EXAMPLES/portable-models/ex_model_Ar_P_LJ + kim-api-collections-management install system $KIM_API_EXAMPLES/portable-models/LennardJones612_UniversalShifted__MO_959249795837_003 + kim-api-collections-management install system $KIM_API_EXAMPLES/simulator-models/Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu + + + ########################################################################### + # Plumed + ########################################################################### + + export PLUMED_PKG_VERSION=2.6.1 + + mkdir plumed + cd plumed + curl -L -o plumed.tar.gz https://github.com/plumed/plumed2/releases/download/v${PLUMED_PKG_VERSION}/plumed-src-${PLUMED_PKG_VERSION}.tgz + tar -xzf plumed.tar.gz + cd plumed-${PLUMED_PKG_VERSION} + ./configure --disable-doc --prefix=/usr + make -j 8 + make install + cd ../../ + rm -rvf plumed + + + ########################################################################### + # Customizations + ########################################################################### # set custom prompt indicating the container name CUSTOM_PROMPT_ENV=/.singularity.d/env/99-zz_custom_prompt.sh cat >$CUSTOM_PROMPT_ENV <$CUSTOM_PROMPT_ENV < /etc/apt/sources.list.d/rocm.list + + apt-get update + apt-get install --no-install-recommends -y \ + kmod \ + file \ + sudo \ + libelf1 \ + rocm-dev \ + rocm-libs \ + build-essential + + apt-get install --no-install-recommends -y software-properties-common + add-apt-repository ppa:openkim/latest + apt-get update + apt-get install --no-install-recommends -y \ + bc \ + build-essential \ + ccache \ + clang \ + cmake \ + cmake-curses-gui \ + curl \ + doxygen \ + enchant \ + g++ \ + gcc \ + gfortran \ + git \ + hdf5-tools \ + less \ + libblas-dev \ + libeigen3-dev \ + libenchant-dev \ + libfftw3-dev \ + libgsl-dev \ + libhdf5-serial-dev \ + libhwloc-dev \ + libjpeg-dev \ + liblapack-dev \ + libnetcdf-dev \ + libomp-dev \ + libopenblas-dev \ + libnuma-dev \ + libpng-dev \ + libproj-dev \ + libvtk6-dev \ + libyaml-dev \ + libzstd-dev \ + make \ + mpi-default-bin \ + mpi-default-dev \ + ninja-build \ + python3-dev \ + python3-pip \ + python3-pkg-resources \ + python3-setuptools \ + python3-virtualenv \ + rsync \ + ssh \ + vim-nox \ + virtualenv \ + voro++-dev \ + wget \ + xxd \ + valgrind \ + gdb \ + zstd \ + libkim-api-dev \ + openkim-models + + + ########################################################################### + # ROCm hipCUB + ########################################################################### + + export PATH=$PATH:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64 + git clone -b rocm-3.7.x https://github.com/ROCmSoftwarePlatform/hipCUB.git + mkdir hipCUB/build + cd hipCUB/build + CXX=hipcc cmake -D BUILD_TEST=off .. + make + make package + make install + + + ########################################################################### + # KIM-API + ########################################################################### + + # workaround for installing files in /usr/share/doc inside of a container + sed -i 's/path-exclude=\/usr\/share\/doc/#path-exclude=\/usr\/share\/doc/g' /etc/dpkg/dpkg.cfg.d/excludes + apt-get install -y libkim-api-doc + sed -i 's/#path-exclude=\/usr\/share\/doc/path-exclude=\/usr\/share\/doc/g' /etc/dpkg/dpkg.cfg.d/excludes + + # install KIM models + KIM_API_EXAMPLES=/usr/share/doc/libkim-api-dev/examples + gunzip $KIM_API_EXAMPLES/portable-models/LennardJones612_UniversalShifted__MO_959249795837_003/LennardJones612_UniversalShifted.params.gz + gunzip $KIM_API_EXAMPLES/model-drivers/ex_model_driver_P_LJ/ex_model_driver_P_LJ.f90.gz + + kim-api-collections-management install system $KIM_API_EXAMPLES/model-drivers/LennardJones612__MD_414112407348_003 + kim-api-collections-management install system $KIM_API_EXAMPLES/model-drivers/ex_model_driver_P_LJ + kim-api-collections-management install system $KIM_API_EXAMPLES/portable-models/LennardJones_Ar + kim-api-collections-management install system $KIM_API_EXAMPLES/portable-models/ex_model_Ar_P_LJ + kim-api-collections-management install system $KIM_API_EXAMPLES/portable-models/LennardJones612_UniversalShifted__MO_959249795837_003 + kim-api-collections-management install system $KIM_API_EXAMPLES/simulator-models/Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu + + + ########################################################################### + # Plumed + ########################################################################### + + export PLUMED_PKG_VERSION=2.6.1 + + mkdir plumed + cd plumed + curl -L -o plumed.tar.gz https://github.com/plumed/plumed2/releases/download/v${PLUMED_PKG_VERSION}/plumed-src-${PLUMED_PKG_VERSION}.tgz + tar -xzf plumed.tar.gz + cd plumed-${PLUMED_PKG_VERSION} + ./configure --disable-doc --prefix=/usr + make + make install + cd ../../ + rm -rvf plumed + + + ########################################################################### + # Customizations + ########################################################################### + + # set custom prompt indicating the container name + CUSTOM_PROMPT_ENV=/.singularity.d/env/99-zz_custom_prompt.sh + cat >$CUSTOM_PROMPT_ENV < /etc/OpenCL/vendors/nvidia.icd + + # clean cache + rm -rf /var/lib/apt/lists/* + + # set custom prompt indicating the container name + CUSTOM_PROMPT_ENV=/.singularity.d/env/99-zz_custom_prompt.sh + cat >$CUSTOM_PROMPT_ENV <