This commit is contained in:
hailin 2025-07-02 21:49:04 +08:00
parent 49b5e17996
commit 1a52ead0a6
1 changed files with 11 additions and 1 deletions

View File

@ -71,6 +71,15 @@ WORKDIR /opt/flashinfer
RUN pip install . && \
python3 -m pip wheel . --no-deps -w dist/
# builder-extras 阶段vllm 安装加上 WORKDIR放在 flashinfer 后)
WORKDIR /opt
RUN git clone -b v0.4.2 https://github.com/vllm-project/vllm.git && \
cd vllm && \
python3 -m pip install ".[triton]" --no-build-isolation && \
python3 -m pip wheel . --no-deps -w /tmp/vllm_wheels
# ── 编译你本地 sglang 源码并打 wheel ───────────────────────────────────────
COPY ./sglang /sgl/sglang
WORKDIR /sgl/sglang/python
@ -82,6 +91,7 @@ RUN mkdir -p /wheels && \
cp /tmp/torch_dist/torch*.whl /wheels/ && \
cp /opt/vision/dist/torchvision-*.whl /wheels/ && \
cp /opt/flashinfer/dist/flashinfer_python-*.whl /wheels/ && \
cp /tmp/vllm_wheels/vllm-*.whl /wheels/ && \
cp /tmp/sg_wheels/sglang-*.whl /wheels/
###############################################################################
@ -94,7 +104,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 libopenmpi-dev openmpi-bin libnuma-dev && \
libopenblas-dev libgomp1 libcupti-dev libnuma1 libopenmpi-dev openmpi-bin libnuma-dev libpng16-16 && \
rm -rf /var/lib/apt/lists/* && \
python3 -m pip install --no-cache-dir --upgrade pip