Unverified Commit a51bebc9 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #2340 from rbberger/container_update

Singularity Container definitions update
parents 9f8b8529 6a40eba2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ From: centos:7
            hdf5-devel python36-virtualenv python36-pip python-pip \
            netcdf-devel netcdf-cxx-devel netcdf-mpich-devel netcdf-openmpi-devel \
            python-virtualenv fftw-devel voro++-devel eigen3-devel gsl-devel openblas-devel enchant \
            blas-devel lapack-devel libyaml-devel openkim-models kim-api-devel
            blas-devel lapack-devel libyaml-devel openkim-models kim-api-devel zstd libzstd-devel
        yum clean all

        # we need to reset any module variables
@@ -36,7 +36,7 @@ From: centos:7
        # manually install Plumed
        mkdir plumed
        cd plumed
        version=2.6.0
        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}
+3 −2
Original line number Diff line number Diff line
@@ -16,7 +16,8 @@ From: centos:8
               texlive-latex-bin texlive-lualatex-math texlive-fncychap texlive-tabulary \
               texlive-framed texlive-wrapfig texlive-upquote texlive-capt-of \
               texlive-needspace texlive-titlesec texlive-anysize texlive-dvipng \
               blas-devel lapack-devel libyaml-devel openkim-models kim-api-devel
               blas-devel lapack-devel libyaml-devel openkim-models kim-api-devel \
               zstd libzstd-devel
        dnf clean all

        # we need to reset any module variables
@@ -41,7 +42,7 @@ From: centos:8
        # manually install Plumed
        mkdir plumed
        cd plumed
        version=2.6.0
        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}
+3 −2
Original line number Diff line number Diff line
@@ -36,7 +36,8 @@ From: fedora:32
               texlive-latex-bin texlive-lualatex-math texlive-fncychap texlive-tabulary \
               texlive-framed texlive-wrapfig texlive-upquote texlive-capt-of \
               texlive-needspace texlive-titlesec texlive-anysize texlive-dvipng \
               blas-devel lapack-devel libyaml-devel openkim-models kim-api-devel
               blas-devel lapack-devel libyaml-devel openkim-models kim-api-devel \
               zstd libzstd-devel
        dnf clean all

        # enable Lmod and load MPI
@@ -47,7 +48,7 @@ From: fedora:32
        # manually install Plumed
        mkdir plumed
        cd plumed
        version=2.6.0
        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}
+52 −16
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ From: ubuntu:18.04
        libproj-dev \
        libvtk6-dev \
        libyaml-dev \
        libzstd-dev \
        make \
        mpi-default-bin \
        mpi-default-dev \
@@ -70,27 +71,55 @@ From: ubuntu:18.04
        xxd \
        valgrind \
        gdb \
        zstd \
        libkim-api-dev \
        openkim-models

    # clean cache
    rm -rf /var/lib/apt/lists/*

        # manually install Plumed
    ###########################################################################
    # 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
        version=2.6.0
        curl -L -o plumed.tar.gz https://github.com/plumed/plumed2/releases/download/v${version}/plumed-src-${version}.tgz
    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-${version}
    cd plumed-${PLUMED_PKG_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


    ###########################################################################
    # Customizations
    ###########################################################################

    # set custom prompt indicating the container name
    CUSTOM_PROMPT_ENV=/.singularity.d/env/99-zz_custom_prompt.sh
    cat >$CUSTOM_PROMPT_ENV <<EOF
@@ -99,6 +128,13 @@ PS1="[ubuntu18.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
+67 −9
Original line number Diff line number Diff line
@@ -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
    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 <<EOF
#!/bin/bash
PS1="[ubuntu18/rocm:\u@\h] \W> "
PS1="[ubuntu18.04/rocm:\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
Loading