Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support of Amazon EFA #179

Merged
merged 12 commits into from
Sep 1, 2023
8 changes: 8 additions & 0 deletions .github/container/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ RUN install-cudnn.sh
ADD install-ofed.sh /usr/local/bin
RUN install-ofed.sh

##############################################################################
## Amazon EFA support (need to run it inside container separately)
##############################################################################

ADD install-efa.sh /usr/local/bin
ENV LD_LIBRARY_PATH=/opt/amazon/efa/lib:$LD_LIBRARY_PATH
ENV PATH=/opt/amazon/efa/bin:$PATH

###############################################################################
## Emergency fix: nsys not in PATH
###############################################################################
Expand Down
38 changes: 38 additions & 0 deletions .github/container/install-efa.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

set -ex

# Update distro
apt-get update

# Install required packages
apt-get install -y curl

# clean up all previously installed library to avoid conflicts
# while installing Amazon EFA version
dpkg --purge efa-config efa-profile libfabric openmpi \
ibacm ibverbs-providers ibverbs-utils infiniband-diags \
libibmad-dev libibmad5 libibnetdisc-dev libibnetdisc5 \
libibumad-dev libibumad3 libibverbs-dev libibverbs1 librdmacm-dev \
librdmacm1 rdma-core rdmacm-utils

# Download Amazon EFA package and install
EFA_INSTALLER_VERSION=latest
WORKDIR=$(mktemp -d)

pushd ${WORKDIR}

AMAZON_EFA_LINK="https://efa-installer.amazonaws.com/aws-efa-installer-${EFA_INSTALLER_VERSION}.tar.gz"
curl -O "$AMAZON_EFA_LINK"
tar -xf aws-efa-installer-${EFA_INSTALLER_VERSION}.tar.gz && cd aws-efa-installer
./efa_installer.sh -y --skip-kmod
DwarKapex marked this conversation as resolved.
Show resolved Hide resolved

popd

# check the installation is successful
/opt/amazon/efa/bin/fi_info --version

# Clean up
apt-get clean
rm -rf /var/lib/apt/lists/*
rm -rf ${WORKDIR}