This commit is contained in:
hailin 2025-07-02 15:46:25 +08:00
parent cfd635060a
commit f25868ef34
1 changed files with 6 additions and 2 deletions

View File

@ -4,7 +4,8 @@
ARG CUDA_VERSION=12.6.1
FROM nvidia/cuda:${CUDA_VERSION}-devel-ubuntu22.04 AS builder-torch
ARG MAX_JOBS=24 # 按机器核心数调整
ENV USE_DISTRIBUTED=1
ARG MAX_JOBS=90
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONUNBUFFERED=1 LANG=C.UTF-8 LC_ALL=C.UTF-8 \
USE_CUDA=1 USE_DISTRIBUTED=0 BUILD_TEST=0 TORCH_CUDA_ARCH_LIST="7.5;8.0;8.6;9.0"
@ -85,7 +86,7 @@ ENV DEBIAN_FRONTEND=noninteractive PYTHONUNBUFFERED=1 LANG=C.UTF-8 LC_ALL=C.UTF-
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 python3-pip python3-distutils ca-certificates \
libopenblas-dev libgomp1 libcupti-dev libnuma1 && \
libopenblas-dev libgomp1 libcupti-dev libnuma1 libopenmpi-dev openmpi-bin libnuma-dev && \
rm -rf /var/lib/apt/lists/* && \
python3 -m pip install --no-cache-dir --upgrade pip
@ -102,5 +103,8 @@ RUN python3 -m pip install --no-cache-dir /tmp/wheels/* && rm -rf /tmp/wheels
# 安装运行时漏掉的依赖
RUN python3 -m pip install --no-cache-dir pydantic orjson psutil pyzmq pynvml transformers==4.48.3 uvicorn fastapi IPython aiohttp setproctitle uvloop sentencepiece triton
RUN apt-get install -y tini
ENTRYPOINT ["/usr/bin/tini", "--"]
# 仅做 CI / CPU 自检 —— 输出帮助后退出 0
CMD ["python3", "-m", "sglang.launch_server", "--help"]