diff --git a/tools/dockerfile/manylinux/Dockerfile-132 b/tools/dockerfile/manylinux/Dockerfile-132 new file mode 100644 index 0000000000000..c6175ace71fba --- /dev/null +++ b/tools/dockerfile/manylinux/Dockerfile-132 @@ -0,0 +1,73 @@ +# 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 \ + 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/* + +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 --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" + +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