From 60d25c2eea15d4b57bd07d04d20745a16fe54f77 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Fri, 4 Sep 2020 11:54:08 -0400 Subject: [PATCH] Update Ubuntu 20.04 container --- tools/singularity/ubuntu20.04.def | 66 +++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 16 deletions(-) diff --git a/tools/singularity/ubuntu20.04.def b/tools/singularity/ubuntu20.04.def index 698397561e..6e68caf542 100644 --- a/tools/singularity/ubuntu20.04.def +++ b/tools/singularity/ubuntu20.04.def @@ -41,6 +41,7 @@ From: ubuntu:20.04 libproj-dev \ libvtk6-dev \ libyaml-dev \ + libzstd-dev \ make \ mpi-default-bin \ mpi-default-dev \ @@ -66,26 +67,52 @@ From: ubuntu:20.04 xxd \ valgrind \ gdb \ + zstd \ libkim-api-dev \ openkim-models - # clean cache - rm -rf /var/lib/apt/lists/* + ########################################################################### + # KIM-API + ########################################################################### - # manually install Plumed - mkdir plumed - cd plumed - version=2.6.1 - curl -L -o plumed.tar.gz https://github.com/plumed/plumed2/releases/download/v${version}/plumed-src-${version}.tgz - tar -xzf plumed.tar.gz - cd plumed-${version} - ./configure --disable-doc --prefix=/usr - make - make install - # fix up installation for CentOS and Fedora - # mv -v /usr/lib/pkgconfig/plumed* /usr/share/pkgconfig/ - cd ../../ - rm -rvf plumed + # 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 @@ -95,6 +122,13 @@ PS1="[ubuntu20.04:\u@\h] \W> " EOF chmod 755 $CUSTOM_PROMPT_ENV + + ########################################################################### + # Cleanup + ########################################################################### + # clean cache + rm -rf /var/lib/apt/lists/* + %environment LC_ALL=C export LC_ALL