This commit is contained in:
parent
847b1c8730
commit
d76ca42383
26
Dockerfile
26
Dockerfile
|
|
@ -89,6 +89,9 @@ WORKDIR /sgl/sglang/python
|
||||||
RUN python3 -m pip install ".[srt,openai]" --no-build-isolation && \
|
RUN python3 -m pip install ".[srt,openai]" --no-build-isolation && \
|
||||||
python3 -m pip wheel ".[srt,openai]" --no-deps -w /tmp/sg_wheels
|
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 ──────────────────────────────────────────────
|
# ── 收集所有 wheel 到 /wheels ──────────────────────────────────────────────
|
||||||
RUN mkdir -p /wheels && \
|
RUN mkdir -p /wheels && \
|
||||||
|
|
@ -134,6 +137,7 @@ RUN ls -lh /tmp/wheels && \
|
||||||
rm -f /tmp/wheels/torch-2.7.1a0+*.whl && \
|
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/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/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 -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)" && \
|
python3 -c "from torch.distributed import Backend; print('✅ Runtime torch distributed OK, GLOO =', Backend.GLOO)" && \
|
||||||
rm -rf /tmp/wheels
|
rm -rf /tmp/wheels
|
||||||
|
|
@ -152,16 +156,16 @@ ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
|
||||||
RUN chmod +x /tini
|
RUN chmod +x /tini
|
||||||
ENTRYPOINT ["/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 推理服务 ----
|
# # ---- 启动 SGLang 推理服务 ----
|
||||||
CMD ["python3", "-m", "sglang.launch_server", \
|
# CMD ["python3", "-m", "sglang.launch_server", \
|
||||||
"--host", "0.0.0.0", \
|
# "--host", "0.0.0.0", \
|
||||||
"--port", "30000", \
|
# "--port", "30000", \
|
||||||
"--model-path", "/root/.cradle/Alibaba/Qwen3-8B/", \
|
# "--model-path", "/root/.cradle/Alibaba/Qwen3-8B/", \
|
||||||
"--tp", "1", \
|
# "--tp", "1", \
|
||||||
"--api-key", "token-abc123"]
|
# "--api-key", "token-abc123"]
|
||||||
Loading…
Reference in New Issue