|
| 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