From 0e0ab72b1c58988847411ce6392591a796f17bf6 Mon Sep 17 00:00:00 2001 From: hailin Date: Tue, 16 Sep 2025 17:01:16 +0800 Subject: [PATCH] . --- Dockerfile | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index df4ffe78c..e3d90313a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -110,13 +110,12 @@ RUN pip wheel "gradio==5.38.2" requests -w /wheels RUN pip wheel pybase64==1.3.2 -w /wheels -# >>> ADD: 导出轮子的独立阶段 +# 导出轮子的独立阶段 FROM scratch AS wheelhouse COPY --from=builder-extras /wheels / -# <<< END ADD -# >>> ADD: 从宿主机目录 _wheelhouse/ 安装轮子的 runtime +# 从宿主机目录 _wheelhouse/ 安装轮子的 runtime ARG CUDA_VERSION=12.6.1 FROM nvidia/cuda:${CUDA_VERSION}-runtime-ubuntu22.04 AS runtime-prebuilt @@ -129,11 +128,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libnccl2=2.22.3-1+cuda12.6 && \ rm -rf /var/lib/apt/lists/* && \ python3 -m pip install --no-cache-dir --upgrade pip - # python3 -m pip install --no-cache-dir xgrammar -# 拷贝 cupti 动态库(与 autobuild 相同) -# COPY --from=builder-extras /usr/local/cuda/lib64/libcupti.so.12 /usr/lib/x86_64-linux-gnu/ -# COPY --from=builder-extras /usr/local/cuda/lib64/libcupti.so /usr/lib/x86_64-linux-gnu/ RUN ldconfig -p | grep -i cupti || (echo "no cupti"; exit 1) RUN ldconfig @@ -168,11 +163,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends gcc g++ build-e 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/* && \ python3 -m pip install --no-cache-dir --upgrade pip - # && python3 -m pip install --no-cache-dir xgrammar - -# 👉 拷贝 cupti 动态库(避免写死版本号) -# COPY --from=builder-extras /usr/local/cuda/lib64/libcupti.so.12 /usr/lib/x86_64-linux-gnu/ -# COPY --from=builder-extras /usr/local/cuda/lib64/libcupti.so /usr/lib/x86_64-linux-gnu/ # 检查 cupti 动态库 RUN ldconfig -p | grep -i cupti || (echo "no cupti"; exit 1) @@ -180,8 +170,6 @@ RUN ldconfig -p | grep -i cupti || (echo "no cupti"; exit 1) # 👇建议在后面补上 RUN ldconfig - -#COPY --from=builder-extras /wheels /tmp/wheels COPY _wheelhouse/ /tmp/wheels/ # ✅ 优先装你自编的 torch,避免被 PyPI 上的覆盖