This commit is contained in:
hailin 2025-09-19 16:06:49 +08:00
parent 662f4e8815
commit c4e86fc0dd
1 changed files with 5 additions and 3 deletions

View File

@ -108,6 +108,8 @@ RUN bash -lc '\
ENV CMAKE_BUILD_PARALLEL_LEVEL=8
ENV SGL_KERNEL_COMPILE_THREADS=1
RUN bash -lc 'ls -la; test -f pyproject.toml -o -f setup.py || (echo "❌ no pyproject.toml/setup.py here; try sgl-kernel/python" && exit 1)'
# 构建 sgl-kernel保持 FA3去掉无效的关 90a 标志)
RUN python3 -m pip install --no-cache-dir "cmake>=3.27,<4.0" scikit-build-core==0.11.6 pybind11[global] packaging && \
bash -lc '\
@ -116,7 +118,7 @@ RUN python3 -m pip install --no-cache-dir "cmake>=3.27,<4.0" scikit-build-core==
export CUDAARCHS="80;86;89" && \
export CMAKE_CUDA_ARCHITECTURES="$CUDAARCHS" && \
# 这里保留常规参数;如果项目支持,也把内核编译线程设为 1未知项将被忽略不会报错
export CMAKE_ARGS="-DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_CUDA_ARCHITECTURES=$CUDAARCHS -Ccmake.define.SGL_KERNEL_COMPILE_THREADS=1" && \
export CMAKE_ARGS="-DCMAKE_CUDA_ARCHITECTURES=$CUDAARCHS -DSGL_KERNEL_COMPILE_THREADS=1 -Wno-dev" && \
python3 -m pip wheel . --no-deps --no-build-isolation -w /tmp/sgl_kernel_wheels \
'
@ -194,7 +196,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
gcc g++ build-essential ninja-build cuda-compiler-12-6 \
libcupti-dev cuda-cupti-12-6 \
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 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
@ -239,7 +241,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\
python3 python3-dev python3-pip python3-distutils curl ca-certificates \
libcupti-dev cuda-cupti-12-6 \
libopenblas-dev libgomp1 libcupti-dev libnuma1 libopenmpi-dev openmpi-bin libnuma-dev libpng16-16 libjpeg8 libnccl2=2.22.3-1+cuda12.6 && \
libopenblas-dev libgomp1 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