This commit is contained in:
hailin 2025-09-15 13:21:03 +08:00
parent 55ed549058
commit 524d2f84f8
1 changed files with 4 additions and 1 deletions

View File

@ -106,6 +106,9 @@ RUN pip wheel \
# ── ✅ 打包 gradio UI 所需依赖 ──────────────────────────────────────────────── # ── ✅ 打包 gradio UI 所需依赖 ────────────────────────────────────────────────
RUN pip wheel "gradio==5.38.2" requests -w /wheels RUN pip wheel "gradio==5.38.2" requests -w /wheels
# 把运行时所需依赖也打包进入wheel ────────────────────────────────────────────────
RUN pip wheel pybase64==1.3.2 -w /wheels
############################################################################### ###############################################################################
# Stage 2 ─ runtime极简运行镜像仅离线安装 wheel # Stage 2 ─ runtime极简运行镜像仅离线安装 wheel
############################################################################### ###############################################################################
@ -116,7 +119,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 gcc g++ build-essential ninja-build cuda-compiler-12-6\ RUN apt-get update && apt-get install -y --no-install-recommends gcc g++ build-essential ninja-build cuda-compiler-12-6\
python3 python3-dev python3-pip python3-distutils curl ca-certificates \ python3 python3-dev python3-pip python3-distutils curl ca-certificates \
libopenblas-dev libgomp1 libcupti-dev libnuma1 libopenmpi-dev openmpi-bin libnuma-dev libpng16-16 libjpeg8 && \ libopenblas-dev libgomp1 libcupti-dev libnuma1 libopenmpi-dev openmpi-bin libnuma-dev libpng16-16 libjpeg8 libnccl2=2.22.3-1+cuda12.6 && \
rm -rf /var/lib/apt/lists/* && \ rm -rf /var/lib/apt/lists/* && \
python3 -m pip install --no-cache-dir --upgrade pip \ python3 -m pip install --no-cache-dir --upgrade pip \
&& python3 -m pip install --no-cache-dir xgrammar && python3 -m pip install --no-cache-dir xgrammar