Skip to content

Commit 6ec0fac

Browse files
bbartelsgemini-code-assist[bot]dtrifiro
authored andcommitted
Removes source compilation of nixl dependency (vllm-project#24874)
Signed-off-by: bbartels <[email protected]> Signed-off-by: Benjamin Bartels <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Daniele <[email protected]> Signed-off-by: xuebwang-amd <[email protected]>
1 parent bb9e0ff commit 6ec0fac

File tree

5 files changed

+77
-116
lines changed

5 files changed

+77
-116
lines changed

docker/Dockerfile

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,10 @@ WORKDIR /vllm-workspace
283283
ENV DEBIAN_FRONTEND=noninteractive
284284
ARG TARGETPLATFORM
285285

286+
ARG GDRCOPY_CUDA_VERSION=12.8
287+
# Keep in line with FINAL_BASE_IMAGE
288+
ARG GDRCOPY_OS_VERSION=Ubuntu22_04
289+
286290
SHELL ["/bin/bash", "-c"]
287291

288292
ARG DEADSNAKES_MIRROR_URL
@@ -441,13 +445,21 @@ COPY tools/install_deepgemm.sh /tmp/install_deepgemm.sh
441445
RUN --mount=type=cache,target=/root/.cache/uv \
442446
VLLM_DOCKER_BUILD_CONTEXT=1 /tmp/install_deepgemm.sh --cuda-version "${CUDA_VERSION}" ${DEEPGEMM_GIT_REF:+--ref "$DEEPGEMM_GIT_REF"}
443447

444-
# Install EP kernels(pplx-kernels and DeepEP), NixL
448+
COPY tools/install_gdrcopy.sh install_gdrcopy.sh
449+
RUN set -eux; \
450+
case "${TARGETPLATFORM}" in \
451+
linux/arm64) UUARCH="aarch64" ;; \
452+
linux/amd64) UUARCH="x64" ;; \
453+
*) echo "Unsupported TARGETPLATFORM: ${TARGETPLATFORM}" >&2; exit 1 ;; \
454+
esac; \
455+
./install_gdrcopy.sh "${GDRCOPY_OS_VERSION}" "${GDRCOPY_CUDA_VERSION}" "${UUARCH}"; \
456+
rm ./install_gdrcopy.sh
457+
458+
# Install EP kernels(pplx-kernels and DeepEP)
445459
COPY tools/ep_kernels/install_python_libraries.sh install_python_libraries.sh
446-
COPY tools/install_nixl.sh install_nixl.sh
447460
ENV CUDA_HOME=/usr/local/cuda
448461
RUN export TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST:-9.0a+PTX}" \
449-
&& bash install_python_libraries.sh \
450-
&& bash install_nixl.sh --force
462+
&& bash install_python_libraries.sh
451463

452464
#################### vLLM installation IMAGE ####################
453465

docs/serving/expert_parallel_deployment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Before using EP, you need to install the necessary dependencies. We are actively
1010

1111
1. **Install DeepEP and pplx-kernels**: Set up host environment following vLLM's guide for EP kernels [here](gh-file:tools/ep_kernels).
1212
2. **Install DeepGEMM library**: Follow the [official instructions](https://github.com/deepseek-ai/DeepGEMM#installation).
13-
3. **For disaggregated serving**: Install UCX and NIXL following the [script](gh-file:tools/install_nixl.sh).
13+
3. **For disaggregated serving**: Install `gdrcopy` by running the [`install_gdrcopy.sh`](gh-file:tools/install_gdrcopy.sh) script (e.g., `install_gdrcopy.sh "${GDRCOPY_OS_VERSION}" "12.8" "x64"`). You can find available OS versions [here](https://developer.download.nvidia.com/compute/redist/gdrcopy/CUDA%2012.8/).
1414

1515
### Backend Selection Guide
1616

@@ -191,7 +191,7 @@ For production deployments requiring strict SLA guarantees for time-to-first-tok
191191

192192
### Setup Steps
193193

194-
1. **Install KV Connector**: Install NIXL using the [installation script](gh-file:tools/install_nixl.sh)
194+
1. **Install gdrcopy/ucx/nixl**: For maximum performance, run the [install_gdrcopy.sh](gh-file:tools/install_gdrcopy.sh) script to install `gdrcopy` (e.g., `install_gdrcopy.sh "${GDRCOPY_OS_VERSION}" "12.8" "x64"`). You can find available OS versions [here](https://developer.download.nvidia.com/compute/redist/gdrcopy/CUDA%2012.8/). If `gdrcopy` is not installed, things will still work with a plain `pip install nixl`, just with lower performance. `nixl` and `ucx` are installed as dependencies via pip.
195195

196196
2. **Configure Both Instances**: Add this flag to both prefill and decode instances `--kv-transfer-config '{"kv_connector":"NixlConnector","kv_role":"kv_both"}`
197197

requirements/kv_connectors.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
lmcache
1+
lmcache
2+
nixl >= 0.5.1 # Required for disaggregated prefill

tools/install_gdrcopy.sh

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# Usage: install_gdrcopy.sh <GDRCOPY_OS_VERSION> <GDRCOPY_CUDA_VERSION> <uuarch>
5+
# uuarch must be "x64" or "aarch64"
6+
# Optional: set GDRCOPY_VERSION to override the libgdrapi package version (default: 2.5.1-1)
7+
# Requires: curl, apt-get, root privileges
8+
if [[ $(id -u) -ne 0 ]]; then
9+
echo "Must be run as root" >&2
10+
11+
exit 1
12+
fi
13+
if [[ $# -ne 3 ]]; then
14+
echo "Usage: $0 <GDRCOPY_OS_VERSION> <GDRCOPY_CUDA_VERSION> <uuarch(x64|aarch64)>" >&2
15+
exit 1
16+
fi
17+
18+
OS_VER="$1"
19+
CUDA_VER="$2"
20+
UUARCH_RAW="$3"
21+
22+
# Normalize/validate arch
23+
case "${UUARCH_RAW,,}" in
24+
aarch64|arm64)
25+
URL_ARCH="aarch64"
26+
DEB_ARCH="arm64"
27+
;;
28+
x64|x86_64|amd64)
29+
URL_ARCH="x64"
30+
DEB_ARCH="amd64"
31+
;;
32+
*)
33+
echo "Unsupported uuarch: ${UUARCH_RAW}. Use 'x64' or 'aarch64'." >&2
34+
exit 1
35+
;;
36+
esac
37+
38+
OS_VER_LOWER="$(tr '[:upper:]' '[:lower:]' <<<"$OS_VER")"
39+
GDRCOPY_PKG_VER="${GDRCOPY_VERSION:-2.5.1-1}"
40+
41+
DEB_NAME="libgdrapi_${GDRCOPY_PKG_VER}_${DEB_ARCH}.${OS_VER}.deb"
42+
BASE_URL="https://developer.download.nvidia.com/compute/redist/gdrcopy"
43+
URL="${BASE_URL}/CUDA%20${CUDA_VER}/${OS_VER_LOWER}/${URL_ARCH}/${DEB_NAME}"
44+
45+
echo "Downloading: ${URL}"
46+
TMPDIR="$(mktemp -d)"
47+
trap 'rm -rf "${TMPDIR}"' EXIT
48+
49+
curl -fSL "${URL}" -o "${TMPDIR}/${DEB_NAME}"
50+
51+
export DEBIAN_FRONTEND=noninteractive
52+
apt-get update
53+
apt-get install -y "${TMPDIR}/${DEB_NAME}"
54+
apt-get clean
55+
rm -rf /var/lib/apt/lists/*
56+
57+
echo "Installed ${DEB_NAME}"

tools/install_nixl.sh

Lines changed: 0 additions & 109 deletions
This file was deleted.

0 commit comments

Comments
 (0)