From 45c70451e249fd140dce3bd912958c02ec2c1216 Mon Sep 17 00:00:00 2001 From: hailin Date: Tue, 16 Sep 2025 19:38:25 +0800 Subject: [PATCH] . --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b5c569c92..1d2fcf42b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,6 +25,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libjpeg-dev libpng-dev ca-certificates && \ python3 -m pip install --no-cache-dir --upgrade pip wheel setuptools sympy pyyaml typing-extensions numpy +RUN python3 -m pip install --no-cache-dir numpy requests packaging build + WORKDIR /opt RUN git clone --recursive -b v2.7.1 https://github.com/pytorch/pytorch.git @@ -39,6 +41,7 @@ RUN echo "Building PyTorch with USE_DISTRIBUTED=$USE_DISTRIBUTED" && \ ARG CUDA_VERSION=12.6.1 FROM nvidia/cuda:${CUDA_VERSION}-devel-ubuntu22.04 AS builder-extras +ENV TORCH_CUDA_ARCH_LIST="7.5;8.0;8.6;8.9;9.0" ENV DEBIAN_FRONTEND=noninteractive PYTHONUNBUFFERED=1 LANG=C.UTF-8 LC_ALL=C.UTF-8 RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -74,8 +77,8 @@ WORKDIR /opt/flashinfer ENV FLASHINFER_CUDA_ARCH_LIST="7.5 8.0 8.6 8.9 9.0a" # 先做 AOT 预编译,再直接打 wheel(不隔离,使用同一份自编 torch) -RUN python3 -m flashinfer.aot && \ - python3 -m pip install --no-cache-dir build && \ +RUN python3 -m pip install --no-cache-dir numpy requests build && \ + python3 -m flashinfer.aot && \ python3 -m build --no-isolation --wheel && \ ls -lh dist/