-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix(container): use released NIXL for SGLang EFA #12106
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,45 +27,17 @@ USER root | |
| # --no-verify: Skip GPG verification (optional, can be removed if verification is needed) | ||
| # Cache apt downloads; sharing=locked avoids apt/dpkg races with concurrent builds. | ||
| RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
| mkdir -p /tmp/efa && \ | ||
| cd /tmp/efa && \ | ||
| curl --retry 3 --retry-delay 2 -fsSL -o aws-efa-installer-${EFA_VERSION}.tar.gz \ | ||
| https://efa-installer.amazonaws.com/aws-efa-installer-${EFA_VERSION}.tar.gz && \ | ||
| tar -xf aws-efa-installer-${EFA_VERSION}.tar.gz && \ | ||
| cd aws-efa-installer && \ | ||
| apt-get update && \ | ||
| ./efa_installer.sh -y --skip-kmod --skip-limit-conf --no-verify && \ | ||
| rm -rf /tmp/efa && \ | ||
| rm -rf /opt/amazon/aws-ofi-nccl /etc/ld.so.conf.d/aws-ofi-nccl.conf && \ | ||
| cd .. && rm -rf aws-efa-installer* && \ | ||
| ldconfig | ||
|
|
||
| ENV EFA_VERSION="${EFA_VERSION}" | ||
|
|
||
|
Comment on lines
39
to
40
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔍 aws.Dockerfile libfabric overlay removal changes EFA behavior for all frameworks This PR (via the underlying #12113 cherry-pick) removes the wheel_builder libfabric overlay logic that conditionally overwrote the EFA-bundled libfabric when older than NIXL_LIBFABRIC_REF ( Was this helpful? React with 👍 or 👎 to provide feedback. |
||
| ARG NIXL_LIBFABRIC_REF | ||
|
|
||
| # Copy the wheel_builder-built libfabric and register it with the dynamic linker | ||
| # ONLY if the EFA-bundled libfabric is older than NIXL_LIBFABRIC_REF. | ||
| # When a future EFA installer ships libfabric >= the version we build, the | ||
| # version comparison evaluates to false and this becomes a no-op automatically. | ||
| RUN --mount=from=wheel_builder,source=/usr/local/libfabric,target=/tmp/libfabric_build \ | ||
| EFA_PC=$(find /opt/amazon/efa -path '*/pkgconfig/libfabric.pc' 2>/dev/null | head -n1) && \ | ||
| EFA_LIBFABRIC_RAW=$(cat "$EFA_PC" 2>/dev/null | grep '^Version:' | awk '{print $2}') && \ | ||
| EFA_LIBFABRIC_VER=$(echo "$EFA_LIBFABRIC_RAW" | grep -oE '^[0-9]+\.[0-9]+(\.[0-9]+)?') && \ | ||
| REF_VER=$(echo "${NIXL_LIBFABRIC_REF}" | sed 's/^v//') && \ | ||
| if [ -n "$EFA_LIBFABRIC_VER" ] && [ -n "$REF_VER" ] && \ | ||
| [ "$(printf '%s\n' "$EFA_LIBFABRIC_VER" "$REF_VER" | sort -V | head -n1)" = "$EFA_LIBFABRIC_VER" ] && \ | ||
| [ "$EFA_LIBFABRIC_VER" != "$REF_VER" ]; then \ | ||
| rm -rf /opt/amazon/efa && \ | ||
| cp -Pfr /tmp/libfabric_build /opt/amazon/efa && \ | ||
| sed -i 's|^prefix=.*|prefix=/opt/amazon/efa|' /opt/amazon/efa/lib/pkgconfig/libfabric.pc && \ | ||
| echo "/opt/amazon/efa/lib" > /etc/ld.so.conf.d/000_efa.conf && \ | ||
| rm -f /etc/ld.so.conf.d/efa.conf && \ | ||
| ldconfig && \ | ||
| echo "[aws] libfabric overlay: ${REF_VER} (overwrites EFA stock ${EFA_LIBFABRIC_RAW})"; \ | ||
| else \ | ||
| echo "[aws] libfabric overlay: skipped (EFA stock ${EFA_LIBFABRIC_RAW:-unknown} >= ${REF_VER})"; \ | ||
| fi | ||
|
|
||
| {% if framework == "trtllm" %} | ||
| # After the upstream mesonpy refactor, libplugin_LIBFABRIC.so lands under the | ||
| # Dynamo venv while the rest of the NIXL plugin set (GDS/UCX/POSIX) remains at | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -115,6 +115,30 @@ RUN --mount=type=cache,target=/root/.cache/pip,sharing=locked \ | |
| export PIP_CACHE_DIR=/root/.cache/pip && \ | ||
| pip install --break-system-packages --no-deps "distro==1.9.0" | ||
|
|
||
| {% if make_efa == true and device == "cuda" and target == "runtime" %} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need for this, we should just introduce ability to upgrade NIXL wheels, it should not be specific to EFA or SGLang.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I’m trying to keep this PR narrowly scoped to the know broken image, which is the SGLang EFA image to reduce impact radius. Your suggestion makes sense for long term in main branch. |
||
| # Release/1.3 SGLang EFA runtime needs a released NIXL wheel with the LIBFABRIC | ||
| # KV transfer fix. Keep this configurable so the release image can move forward | ||
| # without changing the Dockerfile after upstream framework images catch up. | ||
| ARG NIXL_WHEEL_VERSION=1.3.2 | ||
| COPY --chmod=755 container/deps/vllm/install_nixl_from_wheel.sh /usr/local/bin/install_nixl_from_wheel | ||
| RUN --mount=type=cache,target=/root/.cache/pip,sharing=locked \ | ||
| set -eux; \ | ||
| export PIP_CACHE_DIR=/root/.cache/pip; \ | ||
| pip install --break-system-packages --force-reinstall --no-deps --only-binary=:all: \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be introduced as a general argument to force update wheel files to a nixl version.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is to make the PR scope narrow for this specific release. |
||
| "nixl==${NIXL_WHEEL_VERSION}" \ | ||
| "nixl-cu13==${NIXL_WHEEL_VERSION}"; \ | ||
| site_packages=$(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])'); \ | ||
| install_nixl_from_wheel \ | ||
| --wheel-lib-dir "${site_packages}/.nixl_cu13.mesonpy.libs" \ | ||
| --prefix /opt/nvidia/nvda_nixl/lib64 \ | ||
| --skip-headers; \ | ||
| ln -sfn /opt/nvidia/nvda_nixl/lib64/plugins /opt/nvidia/nvda_nixl/plugins | ||
| ENV NIXL_PREFIX=/opt/nvidia/nvda_nixl | ||
| ENV NIXL_LIB_DIR=/opt/nvidia/nvda_nixl/lib64 | ||
| ENV NIXL_PLUGIN_DIR=/opt/nvidia/nvda_nixl/lib64/plugins | ||
| ENV LD_LIBRARY_PATH=/opt/nvidia/nvda_nixl/lib64:/opt/nvidia/nvda_nixl/lib64/plugins:${LD_LIBRARY_PATH:-} | ||
| {% endif %} | ||
|
|
||
| # Install gpu_memory_service wheel if enabled (all targets) | ||
| ARG ENABLE_GPU_MEMORY_SERVICE | ||
| RUN --mount=type=cache,target=/root/.cache/pip,sharing=locked \ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 Compliance version attributions rely on audit job for verification
The native package attributions were updated for EFA 1.49.0: libfabric bumped to
2.4.0amzn5.0with source changed github.com/aws/libfabric, and aws-ofi-nccl to1.20.0(container/compliance/native_packages.yaml:38-47), plussglang-runtime-efaadded to both image filters. These exact upstream version strings could not be verified from within the repo; per the file's own note the authoritative check is the<framework>-compliance-auditsyft scan. If the EFA 1.49.0 installer actually ships different versions, the NOTICES attribution would be inaccurate. Recommend confirming against the 1.49.0 installer's bundled DEB versions.Was this helpful? React with 👍 or 👎 to provide feedback.