From 09222f83452d9a377c9e7da7f508e589ef6cbcbc Mon Sep 17 00:00:00 2001 From: hailin Date: Fri, 4 Jul 2025 09:43:11 +0800 Subject: [PATCH] . --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index d30f1b2..48a19f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -89,9 +89,8 @@ WORKDIR /sgl/sglang/python RUN python3 -m pip install ".[srt,openai]" --no-build-isolation && \ python3 -m pip wheel ".[srt,openai]" --no-deps -w /tmp/sg_wheels -# ── 构建 sgl-kernel 的 Python 模块 ─────────────────────────────── -WORKDIR /sgl/sglang/sgl-kernel -RUN python3 setup.py bdist_wheel && cp dist/sgl_kernel-*.whl /wheels/ +# ── sgl-kernel 的 Python 模块 ─────────────────────────────── +RUN pip download --only-binary=:all: --no-deps sgl-kernel -d /tmp/sgl_kernel_wheel # ── 收集所有 wheel 到 /wheels ────────────────────────────────────────────── RUN mkdir -p /wheels && \ @@ -131,13 +130,15 @@ COPY --from=builder-extras /usr/local/cuda/lib64/libcupti.so /usr/lib/x86_64-lin RUN ldconfig COPY --from=builder-extras /wheels /tmp/wheels +COPY --from=builder-extras /tmp/sgl_kernel_wheel /tmp/sgl_kernel_wheel + #RUN python3 -m pip install --no-cache-dir /tmp/wheels/* && rm -rf /tmp/wheels # ✅ 优先装你自编的 torch,避免被 PyPI 上的覆盖 RUN ls -lh /tmp/wheels && \ rm -f /tmp/wheels/torch-2.7.1a0+*.whl && \ python3 -m pip install --no-cache-dir --no-deps /tmp/wheels/torch*.whl && \ python3 -m pip install --no-cache-dir --no-deps /tmp/wheels/vllm-*.whl && \ - python3 -m pip install --no-cache-dir --no-deps /tmp/wheels/sgl_kernel-*.whl && \ + python3 -m pip install --no-cache-dir --no-deps /tmp/sgl_kernel_wheel/*.whl && \ python3 -m pip install --no-cache-dir --no-deps /tmp/wheels/* && \ python3 -c "from torch.distributed import Backend; print('✅ Runtime torch distributed OK, GLOO =', Backend.GLOO)" && \ rm -rf /tmp/wheels