Skip to content

Commit 2e1b3a5

Browse files
committed
[None][feat] Add libfabric to dockerfile
Signed-off-by: Yoray Zack <[email protected]>
1 parent 96cfdd8 commit 2e1b3a5

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

docker/Dockerfile.multi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ COPY docker/common/install.sh \
4141
docker/common/install_mpi4py.sh \
4242
docker/common/install_pytorch.sh \
4343
docker/common/install_ucx.sh \
44+
docker/common/install_libfabric.sh \
4445
docker/common/install_nixl.sh \
4546
docker/common/install_etcd.sh \
4647
docker/common/install_mooncake.sh \
@@ -80,6 +81,9 @@ RUN bash ./install.sh --opencv && rm install.sh
8081
# Install UCX first
8182
RUN GITHUB_MIRROR=${GITHUB_MIRROR} bash ./install_ucx.sh && rm install_ucx.sh
8283

84+
# Install libfabric for NIXL LIBFABRIC plugin support
85+
RUN GITHUB_MIRROR=${GITHUB_MIRROR} bash ./install_libfabric.sh && rm install_libfabric.sh
86+
8387
# Install NIXL
8488
RUN GITHUB_MIRROR=${GITHUB_MIRROR} bash ./install_nixl.sh && rm install_nixl.sh
8589

docker/common/install_libfabric.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
set -ex
3+
4+
LIBFABRIC_VERSION="v1.21.0"
5+
LIBFABRIC_INSTALL_PATH="/opt/libfabric"
6+
LIBFABRIC_REPO="https://github.com/ofiwg/libfabric.git"
7+
8+
# Install dependencies
9+
apt-get update
10+
apt-get install -y rdma-core libibverbs-dev ibverbs-providers librdmacm-dev
11+
12+
# Clone and build libfabric
13+
rm -rf ${LIBFABRIC_INSTALL_PATH}
14+
git clone --depth 1 -b ${LIBFABRIC_VERSION} ${LIBFABRIC_REPO}
15+
cd libfabric
16+
./autogen.sh
17+
./configure \
18+
--prefix=${LIBFABRIC_INSTALL_PATH} \
19+
--enable-verbs \
20+
--enable-tcp \
21+
--enable-rxm
22+
make install -j"$(nproc)"
23+
cd ..
24+
rm -rf libfabric # Remove libfabric source to save space
25+
26+
# Add to LD_LIBRARY_PATH
27+
echo "export LD_LIBRARY_PATH=${LIBFABRIC_INSTALL_PATH}/lib:\$LD_LIBRARY_PATH" >> "${ENV}"

0 commit comments

Comments
 (0)