This commit is contained in:
parent
29fbdc2cfa
commit
d5b8242ecc
12
Dockerfile
12
Dockerfile
|
|
@ -41,8 +41,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
python3 -m pip install --no-cache-dir --upgrade pip wheel setuptools
|
python3 -m pip install --no-cache-dir --upgrade pip wheel setuptools
|
||||||
|
|
||||||
# ── 安装自编 torch 轮子 ──────────────────────────────────────────────────────
|
# ── 安装自编 torch 轮子 ──────────────────────────────────────────────────────
|
||||||
COPY --from=builder-torch /opt/pytorch/dist/torch-2.7.1+cu126*.whl /tmp/
|
COPY --from=builder-torch /opt/pytorch/dist /tmp/torch_dist
|
||||||
RUN python3 -m pip install --no-cache-dir /tmp/torch-2.7.1+cu126*.whl && rm /tmp/*.whl
|
RUN python3 -m pip install --no-cache-dir $(find /tmp/torch_dist -name "torch-2.7.1+cu126*.whl") && rm -rf /tmp/torch_dist
|
||||||
|
|
||||||
# ── 编译 torchvision 0.22.1 (依赖本地 torch) ────────────────────────────────
|
# ── 编译 torchvision 0.22.1 (依赖本地 torch) ────────────────────────────────
|
||||||
WORKDIR /opt
|
WORKDIR /opt
|
||||||
|
|
@ -64,10 +64,10 @@ RUN python3 -m pip install ".[srt,openai]" --no-build-isolation && \
|
||||||
|
|
||||||
# ── 收集所有 wheel 到 /wheels ──────────────────────────────────────────────
|
# ── 收集所有 wheel 到 /wheels ──────────────────────────────────────────────
|
||||||
RUN mkdir -p /wheels && \
|
RUN mkdir -p /wheels && \
|
||||||
cp /opt/pytorch/dist/torch-2.7.1+cu126*.whl /wheels/ && \
|
cp /tmp/torch_dist/torch*.whl /wheels/ && \
|
||||||
cp /opt/vision/dist/torchvision-0.22.1+cu126*.whl /wheels/ && \
|
cp /opt/vision/dist/torchvision-0.22.1+cu126*.whl /wheels/ && \
|
||||||
cp /opt/flashinfer/python/dist/flashinfer_python-*.whl /wheels/ && \
|
cp /opt/flashinfer/python/dist/flashinfer_python-*.whl /wheels/ && \
|
||||||
cp /tmp/sg_wheels/sglang-*.whl /wheels/
|
cp /tmp/sg_wheels/sglang-*.whl /wheels/
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Stage 2 ─ runtime:极简运行镜像,仅离线安装 wheel
|
# Stage 2 ─ runtime:极简运行镜像,仅离线安装 wheel
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue