Skip to content

Commit 77c5f2f

Browse files
committed
CE: Added pages with guidelines for images on Alps
1 parent 8b0c7af commit 77c5f2f

File tree

7 files changed

+1720
-0
lines changed

7 files changed

+1720
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[](){#ref-ce-guidelines-images}
2+
# Guidelines for images on Alps
3+
4+
This section offers some guidelines about creating and using container images that achieve good performance on the Alps reseach infrastructure.
5+
The section focuses on foundational components (such as communication libraries) which are essential to enabling performant effective usage of Alps' capabilities, rather than full application use cases.
6+
Synthetic benchmarks are also used to showcase quantitative performance.
7+
8+
!!! important
9+
The Containerfiles and examples provided in this section are intended to serve as general reference and starting point.
10+
They are not meant to represent all possible combinations and versions of software capable of running efficiently on Alps.
11+
12+
In the same vein, please note that the content presented here is not intended to represent images officially supported by CSCS staff.
13+
14+
Below is a summary of the software suggested and demonstrated throughout this section:
15+
16+
- Base components:
17+
- CUDA 12.8.1
18+
- GDRCopy 2.5.1
19+
- Libfabric 1.22.0
20+
- UCX 1.19.0
21+
- MPI implementations
22+
- MPICH 4.3.1
23+
- OpenMPI 5.0.8
24+
- Other programming libraries
25+
- NVSHMEM 3.4.5
26+
- Synthetic benchmarks
27+
- OSU Micro-benchmarks 7.5.1
28+
- NCCL Tests 2.17.1
29+
30+
The content is organized in pages which detail container images building incrementally upon each other:
31+
32+
- a base image installing baseline libraries and frameworks (e.g. CUDA, libfabric)
33+
- MPI implementations (MPICH, OpenMPI)
34+
- NVSHMEM
35+
- NCCL tests
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
[](){#ref-ce-guidelines-images-commfwk}
2+
# Communication frameworks image
3+
4+
This page describes a container image providing foundational software components for achieving efficient execution on Alps nodes with NVIDIA GPUs.
5+
6+
The most important aspect to consider for performance of containerized applications is related to use of high-speed networks,
7+
therefore this image mainly installs communication frameworks and libraries, besides general utility tools.
8+
In particular, the [Libfabric](https://ofiwg.github.io/libfabric/) framework (also known as Open Fabrics Interfaces - OFI) is required to interface applications with the Slingshot high-speed network.
9+
10+
At runtime, the container engine [CXI hook][ref-ce-cxi-hook] will replace the Libfabric libraries inside the container with the corresponding libraries on the host system.
11+
This will ensure access to the Slingshot interconnect.
12+
13+
This image is not intended to be used on its own, but to serve as a base to build higher-level software (e.g. MPI implementations) and application stacks.
14+
For this reason, no performance results are provided in this page.
15+
16+
A build of this image is currently hosted on the [Quay.io](https://quay.io/) registry at the following reference:
17+
`quay.io/ethcscs/comm-fwk:ofi1.22-ucx1.19-cuda12.8`.
18+
The image name `comm-fwk` is a shortened form of "communication frameworks".
19+
20+
## Contents
21+
22+
- Ubuntu 24.04
23+
- CUDA 12.8.1
24+
- GDRCopy 2.5.1
25+
- Libfabric 1.22.0
26+
- UCX 1.19.0
27+
28+
## Containerfile
29+
```Dockerfile
30+
ARG ubuntu_version=24.04
31+
ARG cuda_version=12.8.1
32+
FROM docker.io/nvidia/cuda:${cuda_version}-cudnn-devel-ubuntu${ubuntu_version}
33+
34+
RUN apt-get update \
35+
&& DEBIAN_FRONTEND=noninteractive \
36+
apt-get install -y \
37+
build-essential \
38+
ca-certificates \
39+
pkg-config \
40+
automake \
41+
autoconf \
42+
libtool \
43+
cmake \
44+
gdb \
45+
strace \
46+
wget \
47+
git \
48+
bzip2 \
49+
python3 \
50+
gfortran \
51+
rdma-core \
52+
numactl \
53+
libconfig-dev \
54+
libuv1-dev \
55+
libfuse-dev \
56+
libfuse3-dev \
57+
libyaml-dev \
58+
libnl-3-dev \
59+
libnuma-dev \
60+
libsensors-dev \
61+
libcurl4-openssl-dev \
62+
libjson-c-dev \
63+
libibverbs-dev \
64+
--no-install-recommends \
65+
&& rm -rf /var/lib/apt/lists/*
66+
67+
ARG gdrcopy_version=2.5.1
68+
RUN git clone --depth 1 --branch v${gdrcopy_version} https://github.com/NVIDIA/gdrcopy.git \
69+
&& cd gdrcopy \
70+
&& export CUDA_PATH=${CUDA_HOME:-$(echo $(which nvcc) | grep -o '.*cuda')} \
71+
&& make CC=gcc CUDA=$CUDA_PATH lib \
72+
&& make lib_install \
73+
&& cd ../ && rm -rf gdrcopy
74+
75+
# Install libfabric
76+
ARG libfabric_version=1.22.0
77+
RUN git clone --branch v${libfabric_version} --depth 1 https://github.com/ofiwg/libfabric.git \
78+
&& cd libfabric \
79+
&& ./autogen.sh \
80+
&& ./configure --prefix=/usr --with-cuda=/usr/local/cuda --enable-cuda-dlopen --enable-gdrcopy-dlopen --enable-efa \
81+
&& make -j$(nproc) \
82+
&& make install \
83+
&& ldconfig \
84+
&& cd .. \
85+
&& rm -rf libfabric
86+
87+
# Install UCX
88+
ARG UCX_VERSION=1.19.0
89+
RUN wget https://github.com/openucx/ucx/releases/download/v${UCX_VERSION}/ucx-${UCX_VERSION}.tar.gz \
90+
&& tar xzf ucx-${UCX_VERSION}.tar.gz \
91+
&& cd ucx-${UCX_VERSION} \
92+
&& mkdir build \
93+
&& cd build \
94+
&& ../configure --prefix=/usr --with-cuda=/usr/local/cuda --with-gdrcopy=/usr/local --enable-mt --enable-devel-headers \
95+
&& make -j$(nproc) \
96+
&& make install \
97+
&& cd ../.. \
98+
&& rm -rf ucx-${UCX_VERSION}.tar.gz ucx-${UCX_VERSION}
99+
```
100+
101+
## Notes
102+
- The image is based on an official NVIDIA CUDA image, and therefore already provides the NCCL library, alongside a complete CUDA installation.
103+
- Communication frameworks are built with explicit support for CUDA and GDRCopy.
104+
- The libfabric EFA provider is included to leave open the possibility to experiment with derived images on AWS infrastructure as well.
105+
- Although only the libfabric framework is required to support Alps' Slingshot network, this image also packages the UCX communication framework to allow building a broader set of software (e.g. some OpenSHMEM implementations) and supporting optimized Infiniband communication as well.

0 commit comments

Comments
 (0)