Unverified Commit 41a1c96e authored by Richard Berger's avatar Richard Berger
Browse files

Update other GPU containers

parent 3bdfbdcf
Loading
Loading
Loading
Loading
+67 −9
Original line number Original line Diff line number Diff line
@@ -2,7 +2,7 @@ BootStrap: docker
From: ubuntu:18.04
From: ubuntu:18.04


%environment
%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
%post
    export DEBIAN_FRONTEND=noninteractive
    export DEBIAN_FRONTEND=noninteractive
@@ -25,7 +25,8 @@ From: ubuntu:18.04
        build-essential
        build-essential


    apt-get install --no-install-recommends -y software-properties-common
    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 \
    apt-get install --no-install-recommends -y \
        bc \
        bc \
        build-essential \
        build-essential \
@@ -41,7 +42,6 @@ From: ubuntu:18.04
        gfortran \
        gfortran \
        git \
        git \
        hdf5-tools \
        hdf5-tools \
        kmod \
        less \
        less \
        libblas-dev \
        libblas-dev \
        libeigen3-dev \
        libeigen3-dev \
@@ -52,12 +52,15 @@ From: ubuntu:18.04
        libhwloc-dev \
        libhwloc-dev \
        libjpeg-dev \
        libjpeg-dev \
        liblapack-dev \
        liblapack-dev \
        libnetcdf-dev \
        libomp-dev \
        libomp-dev \
        libopenblas-dev \
        libopenblas-dev \
        libnuma-dev \
        libnuma-dev \
        libpng-dev \
        libpng-dev \
        libproj-dev \
        libproj-dev \
        libvtk6-dev \
        libvtk6-dev \
        libyaml-dev \
        libzstd-dev \
        make \
        make \
        mpi-default-bin \
        mpi-default-bin \
        mpi-default-dev \
        mpi-default-dev \
@@ -79,30 +82,85 @@ From: ubuntu:18.04
        wget \
        wget \
        xxd \
        xxd \
        valgrind \
        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
    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
    mkdir hipCUB/build
    cd hipCUB/build
    cd hipCUB/build
    CXX=hipcc cmake -D BUILD_TEST=off ..
    CXX=hipcc cmake -D BUILD_TEST=off ..
    make -j4
    make
    make package
    make package
    make install
    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
    # set custom prompt indicating the container name
    CUSTOM_PROMPT_ENV=/.singularity.d/env/99-zz_custom_prompt.sh
    CUSTOM_PROMPT_ENV=/.singularity.d/env/99-zz_custom_prompt.sh
    cat >$CUSTOM_PROMPT_ENV <<EOF
    cat >$CUSTOM_PROMPT_ENV <<EOF
#!/bin/bash
#!/bin/bash
PS1="[ubuntu18/rocm:\u@\h] \W> "
PS1="[ubuntu18.04/rocm:\u@\h] \W> "
EOF
EOF
    chmod 755 $CUSTOM_PROMPT_ENV
    chmod 755 $CUSTOM_PROMPT_ENV




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

%environment
%environment
    LC_ALL=C
    LC_ALL=C
    export LC_ALL
    export LC_ALL
+4 −1
Original line number Original line Diff line number Diff line
@@ -38,6 +38,8 @@ From: ubuntu:18.04
        cmake \
        cmake \
        cmake-curses-gui \
        cmake-curses-gui \
        curl \
        curl \
        doxygen \
        enchant \
        g++ \
        g++ \
        gcc \
        gcc \
        gfortran \
        gfortran \
@@ -46,6 +48,7 @@ From: ubuntu:18.04
        less \
        less \
        libblas-dev \
        libblas-dev \
        libeigen3-dev \
        libeigen3-dev \
        libenchant-dev \
        libfftw3-dev \
        libfftw3-dev \
        libgsl-dev \
        libgsl-dev \
        libhdf5-serial-dev \
        libhdf5-serial-dev \
@@ -165,7 +168,7 @@ From: ubuntu:18.04
    tar -xzf plumed.tar.gz
    tar -xzf plumed.tar.gz
    cd plumed-${PLUMED_PKG_VERSION}
    cd plumed-${PLUMED_PKG_VERSION}
    ./configure --disable-doc --prefix=/usr
    ./configure --disable-doc --prefix=/usr
    make -j 8
    make
    make install
    make install
    cd ../../
    cd ../../
    rm -rvf plumed
    rm -rvf plumed
+2 −2
Original line number Original line Diff line number Diff line
BootStrap: docker
BootStrap: docker
From: nvidia/cuda:10.2-devel-ubuntu18.04
From: nvidia/cuda:11.0-devel-ubuntu18.04


%post
%post
    export DEBIAN_FRONTEND=noninteractive
    export DEBIAN_FRONTEND=noninteractive
@@ -73,7 +73,7 @@ From: nvidia/cuda:10.2-devel-ubuntu18.04
    CUSTOM_PROMPT_ENV=/.singularity.d/env/99-zz_custom_prompt.sh
    CUSTOM_PROMPT_ENV=/.singularity.d/env/99-zz_custom_prompt.sh
    cat >$CUSTOM_PROMPT_ENV <<EOF
    cat >$CUSTOM_PROMPT_ENV <<EOF
#!/bin/bash
#!/bin/bash
PS1="[ubuntu18/nvidia:\u@\h] \W> "
PS1="[ubuntu18.04/nvidia:\u@\h] \W> "
EOF
EOF
    chmod 755 $CUSTOM_PROMPT_ENV
    chmod 755 $CUSTOM_PROMPT_ENV


+170 −0
Original line number Original line Diff line number Diff line
BootStrap: docker
From: ubuntu:20.04

%environment
    export PATH=/usr/lib/ccache:/usr/local/cuda-11.0/bin:${PATH}:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64
%post
    export DEBIAN_FRONTEND=noninteractive
    apt-get update
    apt-get upgrade --no-install-recommends -y

    apt-get install -y --no-install-recommends curl libnuma-dev gnupg

    curl -sL http://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | apt-key add -
    # AMD is using xenial folder also for focal
    printf "deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main" > /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 <<EOF
#!/bin/bash
PS1="[ubuntu20.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
    # tell OpenMPI to not try using Infiniband
    OMPI_MCA_btl="^openib"
    # do not warn about unused components as this messes up testing
    OMPI_MCA_btl_base_warn_component_unused="0"
    export OMPI_MCA_btl OMPI_MCA_btl_base_warn_component_unused

%labels
    Author rbberger, akohlmey
+4 −1
Original line number Original line Diff line number Diff line
@@ -39,6 +39,8 @@ From: ubuntu:20.04
        cmake \
        cmake \
        cmake-curses-gui \
        cmake-curses-gui \
        curl \
        curl \
        doxygen \
        enchant \
        g++ \
        g++ \
        gcc \
        gcc \
        gfortran \
        gfortran \
@@ -47,6 +49,7 @@ From: ubuntu:20.04
        less \
        less \
        libblas-dev \
        libblas-dev \
        libeigen3-dev \
        libeigen3-dev \
        libenchant-dev \
        libfftw3-dev \
        libfftw3-dev \
        libgsl-dev \
        libgsl-dev \
        libhdf5-serial-dev \
        libhdf5-serial-dev \
@@ -123,7 +126,7 @@ From: ubuntu:20.04
    mkdir hipCUB/build
    mkdir hipCUB/build
    cd hipCUB/build
    cd hipCUB/build
    CXX=hipcc cmake -D BUILD_TEST=off ..
    CXX=hipcc cmake -D BUILD_TEST=off ..
    make -j 8
    make
    make package
    make package
    make install
    make install


Loading