Singularity 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Copyright (c) 2021 NVIDIA Corporation. All rights reserved.
  2. Bootstrap: docker
  3. FROM: nvcr.io/nvidia/nvhpc:21.5-devel-cuda_multi-ubuntu20.04
  4. %environment
  5. export XDG_RUNTIME_DIR=
  6. export PATH="/opt/openmpi/ompi/bin/:/usr/local/bin:/opt/anaconda3/bin:/usr/bin:/opt/nvidia/nsight-systems/2020.5.1/bin:/opt/nvidia/nsight-compute/2020.2.1:$PATH"
  7. export LD_LIBRARY_PATH="/opt/openmpi/ompi/lib:/pmi_utils/lib/:/usr/local/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/21.5/cuda/lib64/:$LD_LIBRARY_PATH"
  8. %post
  9. build_tmp=$(mktemp -d) && cd ${build_tmp}
  10. apt-get -y update
  11. apt-get -y dist-upgrade
  12. DEBIAN_FRONTEND=noninteractive apt-get -yq install --no-install-recommends \
  13. m4 vim-nox emacs-nox nano zip\
  14. python3-pip python3-setuptools git-core inotify-tools \
  15. curl git-lfs \
  16. build-essential libtbb-dev
  17. rm -rf /var/lib/apt/cache/*
  18. pip3 install --upgrade pip
  19. pip3 install --no-cache-dir jupyter
  20. pip3 install --no-cache-dir jupyterlab
  21. pip3 install gdown
  22. apt-get install --no-install-recommends -y build-essential
  23. # NVIDIA nsight-systems-2020.5.1 ,nsight-compute-2
  24. apt-get update -y
  25. DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends apt-transport-https ca-certificates gnupg wget
  26. apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys F60F4B3D7FA2AF80
  27. echo "deb https://developer.download.nvidia.com/devtools/repos/ubuntu2004/amd64/ /" >> /etc/apt/sources.list.d/nsight.list
  28. apt-get update -y
  29. DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends nsight-systems-2020.5.1 nsight-compute-2020.2.1
  30. apt-get install --no-install-recommends -y build-essential
  31. wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
  32. bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/anaconda3
  33. rm Miniconda3-latest-Linux-x86_64.sh
  34. # Install CUDA-aware OpenMPI with UCX and PMI
  35. mkdir -p /opt/openmpi && cd /opt/openmpi
  36. wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.1.tar.gz
  37. tar -xvzf openmpi-4.1.1.tar.gz
  38. mkdir -p /opt/openmpi/ompi/
  39. cd /opt/openmpi/openmpi-4.1.1/
  40. ./configure --prefix=/opt/openmpi/ompi/ --with-libevent=internal --with-xpmem --with-cuda=/opt/nvidia/hpc_sdk/Linux_x86_64/21.5/cuda/ --with-slurm --with-pmix=internal --with-pmi=/pmi_utils/ --enable-mpi1-compatibility --with-verbs --with-hcoll=/opt/nvidia/hpc_sdk/Linux_x86_64/21.5/comm_libs/hpcx/hpcx-2.8.1/hcoll/ --with-ucx=/opt/nvidia/hpc_sdk/Linux_x86_64/21.5/comm_libs/hpcx/hpcx-2.8.1/ucx/
  41. export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/pmi_utils/lib/"
  42. make all install
  43. cd /
  44. rm -rf ${build_tmp}
  45. %files
  46. labs/ /labs
  47. slurm_pmi_config/ /pmi_utils
  48. %runscript
  49. "$@"
  50. %labels
  51. AUTHOR Anish-Saxena