From bc27b4aaf1e2b36dea408bb74d10e96d15e81735 Mon Sep 17 00:00:00 2001 From: gouzi <530971494@qq.com> Date: Tue, 14 Apr 2026 17:32:16 +0800 Subject: [PATCH 1/3] feat: Add CUDA 13.2 Dockerfile --- tools/dockerfile/manylinux/Dockerfile-132 | 71 +++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 tools/dockerfile/manylinux/Dockerfile-132 diff --git a/tools/dockerfile/manylinux/Dockerfile-132 b/tools/dockerfile/manylinux/Dockerfile-132 new file mode 100644 index 0000000000000..adc08cdfac096 --- /dev/null +++ b/tools/dockerfile/manylinux/Dockerfile-132 @@ -0,0 +1,71 @@ +# A image for building paddle binaries +# Use cuda devel base image for both cpu and gpu environment +# When you modify it, please be aware of cudnn-runtime version +ARG CUDA_VERSION=13.2 +ARG BASE_TARGET=cuda${CUDA_VERSION} + +FROM nvcr.io/nvidia/cuda:13.2.0-cudnn-devel-ubuntu24.04 as base +MAINTAINER PaddlePaddle Authors + + +# ENV variables +ARG WITH_GPU +ARG WITH_AVX +ARG PYTHON_VERSION=3.12 + +ENV WITH_GPU=${WITH_GPU:-ON} +ENV WITH_AVX=${WITH_AVX:-ON} +ENV DEBIAN_FRONTEND=noninteractive +ENV LD_LIBRARY_PATH=/usr/local/cuda-${CUDA_VERSION}/compat:/usr/local/cuda-${CUDA_VERSION}/targets/x86_64-linux/lib:$LD_LIBRARY_PATH + +ENV HOME /root + +RUN apt-get update --allow-unauthenticated && \ + apt-get install -y --no-install-recommends \ + git \ + vim \ + curl \ + wget \ + make \ + libgl1 \ + libglib2.0-0 \ + libssl-dev \ + autoconf \ + automake \ + libtool \ + libmlx5-1 \ + libibverbs-dev \ + python${PYTHON_VERSION} \ + python${PYTHON_VERSION}-dev \ + python3-pip && \ + ln -sf /usr/bin/python3 /usr/bin/python && \ + rm -rf /var/lib/apt/lists/* + +WORKDIR /home +RUN wget -q https://cmake.org/files/v3.31/cmake-3.31.0-linux-x86_64.tar.gz && \ + tar -zxf cmake-3.31.0-linux-x86_64.tar.gz && \ + rm cmake-3.31.0-linux-x86_64.tar.gz && \ + rm -rf /home/cmake-3.31.0-linux-x86_64/doc /home/cmake-3.31.0-linux-x86_64/man + +ENV PATH=/home/cmake-3.31.0-linux-x86_64/bin:$PATH + + +ARG TMP_DIR=patchelf_tmp +RUN rm -rf "$TMP_DIR" && git clone -b 0.15.0 https://github.com/NixOS/patchelf "$TMP_DIR" && \ + cd "$TMP_DIR" && ./bootstrap.sh && \ + ./configure && make && make install && \ + cd .. && rm -rf "$TMP_DIR" + +RUN wget -q https://paddle-ci.gz.bcebos.com/ccache-4.8.2.tar.gz && \ + tar xf ccache-4.8.2.tar.gz && mkdir /usr/local/ccache-4.8.2 && cd ccache-4.8.2 && \ + mkdir build && cd build && \ + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/ccache-4.8.2 .. && \ + make -j8 && make install && \ + ln -s /usr/local/ccache-4.8.2/bin/ccache /usr/local/bin/ccache && \ + cd ../../ && rm -rf ccache-4.8.2.tar.gz && rm -rf ccache-4.8.2 + +COPY paddle/scripts/compile_requirements.txt /root +COPY python/requirements.txt /root +RUN pip install --break-system-packages -r /root/requirements.txt && \ + pip install --break-system-packages -r /root/compile_requirements.txt && \ + rm -rf /root/compile_requirements.txt /root/requirements.txt From acd35128cfaeae958d55f6acc8246ed43941aa59 Mon Sep 17 00:00:00 2001 From: gouzil <66515297+gouzil@users.noreply.github.com> Date: Tue, 14 Apr 2026 19:58:12 +0800 Subject: [PATCH 2/3] Update tools/dockerfile/manylinux/Dockerfile-132 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- tools/dockerfile/manylinux/Dockerfile-132 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/dockerfile/manylinux/Dockerfile-132 b/tools/dockerfile/manylinux/Dockerfile-132 index adc08cdfac096..a6c8ee1a79807 100644 --- a/tools/dockerfile/manylinux/Dockerfile-132 +++ b/tools/dockerfile/manylinux/Dockerfile-132 @@ -51,7 +51,7 @@ ENV PATH=/home/cmake-3.31.0-linux-x86_64/bin:$PATH ARG TMP_DIR=patchelf_tmp -RUN rm -rf "$TMP_DIR" && git clone -b 0.15.0 https://github.com/NixOS/patchelf "$TMP_DIR" && \ +RUN rm -rf "$TMP_DIR" && git clone --depth 1 --branch 0.15.0 https://github.com/NixOS/patchelf "$TMP_DIR" && \ cd "$TMP_DIR" && ./bootstrap.sh && \ ./configure && make && make install && \ cd .. && rm -rf "$TMP_DIR" From 09dbda4e7096b1cc36ba15e5ba93e98fcff6d624 Mon Sep 17 00:00:00 2001 From: gouzi <530971494@qq.com> Date: Sat, 18 Apr 2026 22:57:48 +0800 Subject: [PATCH 3/3] add nccl --- tools/dockerfile/manylinux/Dockerfile-132 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/dockerfile/manylinux/Dockerfile-132 b/tools/dockerfile/manylinux/Dockerfile-132 index a6c8ee1a79807..c6175ace71fba 100644 --- a/tools/dockerfile/manylinux/Dockerfile-132 +++ b/tools/dockerfile/manylinux/Dockerfile-132 @@ -37,7 +37,9 @@ RUN apt-get update --allow-unauthenticated && \ libibverbs-dev \ python${PYTHON_VERSION} \ python${PYTHON_VERSION}-dev \ - python3-pip && \ + python3-pip \ + libnccl2=2.29.7-1+cuda13.2 \ + libnccl-dev=2.29.7-1+cuda13.2 && \ ln -sf /usr/bin/python3 /usr/bin/python && \ rm -rf /var/lib/apt/lists/*