This commit is contained in:
parent
d76ca42383
commit
09222f8345
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue