Skip to content

Commit f52c302

Browse files
author
Bhanu Teja Goshikonda
committed
Revert "fix(tensorflow): mirror sglang EFA install pattern for 1.49"
This reverts commit f3c86f1. Restores --disable-ngc in install_efa_amzn2023.sh. Empirical result: sglang's cuda-rhel9 + symlink pattern does not satisfy EFA 1.49's check_libnccl_net_so, which verifies the actual EFA-shipped libnccl-net-ofi.so at /opt/amazon/ofi-nccl/lib64/. cuda-rhel9 installs libnccl at /usr/lib64/ — different file at a different path. sglang's pattern works on EFA 1.48 because 1.48's check has the buggy /opt/amazon/efa/lib/ path that the symlink resolves through. --disable-ngc remains the correct fix for 1.49: it forces the standard install path, which installs libnccl-ofi-1.20.0-1.amzn2023.x86_64.rpm directly from the EFA installer tarball to the correct location.
1 parent f3c86f1 commit f52c302

2 files changed

Lines changed: 13 additions & 12 deletions

File tree

docker/tensorflow/2.21/Dockerfile.cuda

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,8 @@ ENV PATH="/opt/venv/bin:${OPEN_MPI_PATH}/bin:${EFA_PATH}/bin:/usr/local/cuda/bin
121121
# (NCCL dlopens libnccl-net-ofi.so from this path).
122122
ENV LD_LIBRARY_PATH="/opt/amazon/openmpi/lib:/opt/amazon/efa/lib:/opt/amazon/ofi-nccl/lib64:/usr/local/cuda/lib64:/usr/local/lib:${LD_LIBRARY_PATH}"
123123

124-
# Install EFA (mirrors SGLang: pre-install libnccl from cuda-rhel9 repo so the
125-
# system libnccl is present, symlink lib->lib64 so EFA 1.49's NGC-mode
126-
# post-install path check resolves, then clean up).
127124
COPY scripts/docker/common/install_efa_amzn2023.sh /tmp/install_efa.sh
128-
RUN echo -e '[cuda-rhel9]\nname=cuda-rhel9\nbaseurl=https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64\nenabled=1\ngpgcheck=1' >/etc/yum.repos.d/cuda-rhel9.repo \
129-
&& dnf install -y --setopt=install_weak_deps=False libnccl libnccl-devel \
130-
&& ldconfig \
131-
&& mkdir -p /opt/amazon/efa && ln -sf /opt/amazon/efa/lib64 /opt/amazon/efa/lib \
132-
&& bash /tmp/install_efa.sh "${EFA_VERSION}" \
133-
&& rm /tmp/install_efa.sh \
134-
&& dnf remove -y libnccl-devel \
135-
&& dnf clean all && rm -rf /var/cache/dnf
125+
RUN bash /tmp/install_efa.sh "${EFA_VERSION}" && rm /tmp/install_efa.sh
136126

137127
# Wipe EFA's bundled OpenMPI before building OMPI 4.1.8 from source. Both
138128
# target /opt/amazon/openmpi; without this cleanup wrapper mpirun gets

scripts/docker/common/install_efa_amzn2023.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,18 @@ function install_efa {
3333
curl -O https://s3-us-west-2.amazonaws.com/aws-efa-installer/aws-efa-installer-${EFA_VERSION}.tar.gz
3434
tar -xf aws-efa-installer-${EFA_VERSION}.tar.gz
3535
cd aws-efa-installer
36-
./efa_installer.sh -y --skip-kmod --skip-limit-conf --no-verify
36+
37+
# EFA 1.48+ auto-detects NGC containers via /opt/nvidia/nvidia_entrypoint.sh
38+
# (present in nvidia/cuda:*-amzn2023 bases) and then skips the AL2023
39+
# libnccl-ofi RPM. Force the standard install path so the OFI-NCCL plugin
40+
# is installed and libnccl-net-ofi.so ends up at /opt/amazon/ofi-nccl/lib64/.
41+
# --disable-ngc was added in EFA 1.48; guard so 1.47 callers still work.
42+
EFA_EXTRA_ARGS=""
43+
if [[ "$EFA_VERSION" > "1.47.99" ]]; then
44+
EFA_EXTRA_ARGS="--disable-ngc"
45+
fi
46+
47+
./efa_installer.sh -y --skip-kmod --skip-limit-conf --no-verify ${EFA_EXTRA_ARGS}
3748
rm -rf /tmp/efa
3849

3950
mv ${OPEN_MPI_PATH}/bin/mpirun ${OPEN_MPI_PATH}/bin/mpirun.real

0 commit comments

Comments
 (0)