From 55fdb7f12a4a4b6f3a291f0d34b57ab391722245 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 8 Jun 2022 08:19:54 -0400 Subject: [PATCH] update GPU container definitions for CUDA 11.7 and singularity -> apptainer --- doc/src/Tools.rst | 17 +++++++++-------- tools/singularity/README.md | 10 ++++++---- tools/singularity/ubuntu18.04_gpu.def | 14 +++++++------- tools/singularity/ubuntu20.04_gpu.def | 12 ++++++------ 4 files changed, 28 insertions(+), 25 deletions(-) diff --git a/doc/src/Tools.rst b/doc/src/Tools.rst index ef403daa84..b57c91ffee 100644 --- a/doc/src/Tools.rst +++ b/doc/src/Tools.rst @@ -95,7 +95,7 @@ Miscellaneous tools * :ref:`LAMMPS shell ` * :ref:`LAMMPS magic patterns for file(1) ` * :ref:`Offline build tool ` - * :ref:`singularity ` + * :ref:`singularity/apptainer ` * :ref:`SWIG interface ` * :ref:`vim ` @@ -1007,14 +1007,15 @@ Ivanov, at University of Iceland (ali5 at hi.is). .. _singularity_tool: -singularity tool ----------------------------------------- +singularity/apptainer tool +-------------------------- -The singularity sub-directory contains container definitions files -that can be used to build container images for building and testing -LAMMPS on specific OS variants using the `Singularity `_ -container software. Contributions for additional variants are welcome. -For more details please see the README.md file in that folder. +The singularity sub-directory contains container definitions files that +can be used to build container images for building and testing LAMMPS on +specific OS variants using the `Apptainer `_ or +`Singularity `_ container software. Contributions for +additional variants are welcome. For more details please see the +README.md file in that folder. ---------- diff --git a/tools/singularity/README.md b/tools/singularity/README.md index db7aa9e3b0..4700dac6ec 100644 --- a/tools/singularity/README.md +++ b/tools/singularity/README.md @@ -1,17 +1,19 @@ -# Singularity container definitions for compiling/testing LAMMPS +# Apptainer (aka Singularity) container definitions for compiling/testing LAMMPS The *.def files in this folder can be used to build container images -for [Singularity](https://sylabs.io), suitable for compiling and testing +for [Apptainer](https://apptainer.org) (previously called +[Singularity](https://sylabs.io)), suitable for compiling and testing LAMMPS on a variety of OS variants with support for most standard packages and - for some of them - also building/spellchecking the manual -in all supported formats. This allows to test and debug LAMMPS code on +in all supported formats. This allows to test and debug LAMMPS code on different OS variants without doing a full installation on your development workstation, e.g. when bugs are reported that can only be reproduced on a specific OS or with specific (mostly older) versions of tools, compilers, or libraries. Here is a workflow for testing a compilation of LAMMPS with a locally -built CentOS 7.x singularity container. +built CentOS 7.x Singularity container. For Apptainer replace the +`singularity` command with `apptainer`. ``` cd some/work/directory diff --git a/tools/singularity/ubuntu18.04_gpu.def b/tools/singularity/ubuntu18.04_gpu.def index 6aa37ccf84..fac27dc7f3 100644 --- a/tools/singularity/ubuntu18.04_gpu.def +++ b/tools/singularity/ubuntu18.04_gpu.def @@ -2,11 +2,11 @@ BootStrap: docker From: ubuntu:18.04 %environment - export PATH=/usr/lib/ccache:/usr/local/cuda-11.5/bin:${PATH}:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64 - export CUDADIR=/usr/local/cuda-11.5 - export CUDA_PATH=/usr/local/cuda-11.5 - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.5/lib64:/opt/rocm/lib:/opt/rocm-4.5.0/llvm/lib - export LIBRARY_PATH=/usr/local/cuda-11.5/lib64/stubs + export PATH=/usr/lib/ccache:/usr/local/cuda-11.7/bin:${PATH}:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64 + export CUDADIR=/usr/local/cuda-11.7 + export CUDA_PATH=/usr/local/cuda-11.7 + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.7/lib64:/opt/rocm/lib:/opt/rocm-4.5.0/llvm/lib + export LIBRARY_PATH=/usr/local/cuda-11.7/lib64/stubs %post export DEBIAN_FRONTEND=noninteractive apt-get update @@ -122,11 +122,11 @@ From: ubuntu:18.04 wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600 - apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub + apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /" apt-get update - export CUDA_PKG_VERSION=11.5 + export CUDA_PKG_VERSION=11.7 apt-get install -y --no-install-recommends \ cuda-libraries-${CUDA_PKG_VERSION} \ diff --git a/tools/singularity/ubuntu20.04_gpu.def b/tools/singularity/ubuntu20.04_gpu.def index 23bddeb14f..8c40f6c8d6 100644 --- a/tools/singularity/ubuntu20.04_gpu.def +++ b/tools/singularity/ubuntu20.04_gpu.def @@ -2,11 +2,11 @@ BootStrap: docker From: ubuntu:20.04 %environment - export PATH=/usr/lib/ccache:/usr/local/cuda-11.5/bin:${PATH}:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64 - export CUDADIR=/usr/local/cuda-11.5 - export CUDA_PATH=/usr/local/cuda-11.5 - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.5/lib64:/opt/rocm/lib:/opt/rocm-4.5.0/llvm/lib - export LIBRARY_PATH=/usr/local/cuda-11.5/lib64/stubs + export PATH=/usr/lib/ccache:/usr/local/cuda-11.7/bin:${PATH}:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64 + export CUDADIR=/usr/local/cuda-11.7 + export CUDA_PATH=/usr/local/cuda-11.7 + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.7/lib64:/opt/rocm/lib:/opt/rocm-4.5.0/llvm/lib + export LIBRARY_PATH=/usr/local/cuda-11.7/lib64/stubs %post export DEBIAN_FRONTEND=noninteractive apt-get update @@ -109,7 +109,7 @@ From: ubuntu:20.04 wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 - apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub + apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" apt-get update