build multi arch

This commit is contained in:
2026-01-17 17:25:05 +01:00
parent a89ddd2d13
commit b96dc1ed91
5 changed files with 64 additions and 17 deletions

View File

@@ -99,17 +99,20 @@ RUN pip install -r python/requirements.txt || true
RUN mkdir -p build
WORKDIR /build/Paddle/build
# Configure for CPU-only build
# Configure for CPU-only ARM64 build
# WITH_ARM=ON enables ARM NEON optimizations and disables x86-specific code (XBYAK, MKL)
RUN cmake .. \
-GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DPY_VERSION=${PYTHON_VERSION} \
-DWITH_GPU=OFF \
-DWITH_ARM=ON \
-DWITH_TESTING=OFF \
-DWITH_DISTRIBUTE=OFF \
-DWITH_NCCL=OFF \
-DWITH_MKL=OFF \
-DWITH_MKLDNN=OFF \
-DWITH_XBYAK=OFF \
-DON_INFER=OFF \
-DWITH_PYTHON=ON \
-DWITH_AVX=OFF \
@@ -121,8 +124,9 @@ RUN cmake .. \
RUN --mount=type=cache,target=/ccache \
ninja extern_gflags extern_glog extern_protobuf extern_zlib extern_eigen3
# Note: extern_xbyak excluded - it's x86-only and disabled with WITH_ARM=ON
RUN --mount=type=cache,target=/ccache \
ninja extern_openblas extern_pybind extern_utf8proc extern_xxhash extern_yaml extern_cryptopp extern_warpctc extern_warprnnt extern_gloo extern_xbyak
ninja extern_openblas extern_pybind extern_utf8proc extern_xxhash extern_yaml extern_cryptopp extern_warpctc extern_warprnnt extern_gloo
# Build PaddlePaddle
RUN --mount=type=cache,target=/ccache \