From d76ca42383682550dd1c1feb3f26787a9953dd75 Mon Sep 17 00:00:00 2001 From: hailin Date: Fri, 4 Jul 2025 09:37:13 +0800 Subject: [PATCH] . --- Dockerfile | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index b52e7d8..d30f1b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -89,6 +89,9 @@ 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/ # ── 收集所有 wheel 到 /wheels ────────────────────────────────────────────── RUN mkdir -p /wheels && \ @@ -134,6 +137,7 @@ 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/wheels/* && \ python3 -c "from torch.distributed import Backend; print('✅ Runtime torch distributed OK, GLOO =', Backend.GLOO)" && \ rm -rf /tmp/wheels @@ -152,16 +156,16 @@ ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini RUN chmod +x /tini ENTRYPOINT ["/tini", "--"] -# ---- 拷贝模型(路径可换) ---- -COPY ./Alibaba/Qwen3-8B /root/.cradle/Alibaba/Qwen3-8B +# # ---- 拷贝模型(路径可换) ---- +# COPY ./Alibaba/Qwen3-8B /root/.cradle/Alibaba/Qwen3-8B -# ---- 暴露端口 ---- -EXPOSE 30000 +# # ---- 暴露端口 ---- +# EXPOSE 30000 -# ---- 启动 SGLang 推理服务 ---- -CMD ["python3", "-m", "sglang.launch_server", \ - "--host", "0.0.0.0", \ - "--port", "30000", \ - "--model-path", "/root/.cradle/Alibaba/Qwen3-8B/", \ - "--tp", "1", \ - "--api-key", "token-abc123"] \ No newline at end of file +# # ---- 启动 SGLang 推理服务 ---- +# CMD ["python3", "-m", "sglang.launch_server", \ +# "--host", "0.0.0.0", \ +# "--port", "30000", \ +# "--model-path", "/root/.cradle/Alibaba/Qwen3-8B/", \ +# "--tp", "1", \ +# "--api-key", "token-abc123"] \ No newline at end of file