1- FROM quay.io/pypa/manylinux_2_28_x86_64:2025-01-05-75aeda9 as builder
1+ ARG ARCH
2+ FROM quay.io/pypa/manylinux_2_28_${ARCH}:2025.02.02-1 as builder
23
4+ ARG ARCH
35ARG NPROCS=24
46ARG BUILD_DIR=/opt/smelibs
57ARG TMP_DIR=/opt/tmpwd
@@ -56,7 +58,7 @@ RUN mkdir -p $TMP_DIR && cd $TMP_DIR \
5658 && ./configure \
5759 --prefix=$BUILD_DIR \
5860 --disable-shared \
59- --host=x86_64 -unknown-linux-gnu \
61+ --host=${ARCH} -unknown-linux-gnu \
6062 --enable-static \
6163 --with-pic \
6264 --enable-cxx \
@@ -75,7 +77,7 @@ RUN mkdir -p $TMP_DIR && cd $TMP_DIR \
7577 && ./configure \
7678 --prefix=$BUILD_DIR \
7779 --disable-shared \
78- --host=x86_64 -unknown-linux-gnu \
80+ --host=${ARCH} -unknown-linux-gnu \
7981 --enable-static \
8082 --with-pic \
8183 --with-gmp-lib=$BUILD_DIR/lib \
@@ -182,7 +184,7 @@ RUN mkdir -p $TMP_DIR && cd $TMP_DIR \
182184 && ninja install \
183185 && rm -rf $TMP_DIR
184186
185- ARG LLVM_VERSION="19.1.6 "
187+ ARG LLVM_VERSION="19.1.7 "
186188RUN mkdir -p $TMP_DIR && cd $TMP_DIR \
187189 && git clone \
188190 -b llvmorg-$LLVM_VERSION \
@@ -196,7 +198,7 @@ RUN mkdir -p $TMP_DIR && cd $TMP_DIR \
196198 -DCMAKE_BUILD_TYPE=Release \
197199 -DCMAKE_INSTALL_PREFIX=$BUILD_DIR \
198200 -DPython3_EXECUTABLE:FILEPATH=/opt/python/cp312-cp312/bin/python \
199- -DLLVM_DEFAULT_TARGET_TRIPLE=x86_64 -unknown-linux-gnu \
201+ -DLLVM_DEFAULT_TARGET_TRIPLE=${ARCH} -unknown-linux-gnu \
200202 -DLLVM_TARGETS_TO_BUILD="X86" \
201203 -DLLVM_BUILD_TOOLS=OFF \
202204 -DLLVM_INCLUDE_TOOLS=OFF \
@@ -724,27 +726,31 @@ RUN mkdir -p $TMP_DIR && cd $TMP_DIR \
724726 && ninja install \
725727 && rm -rf $TMP_DIR
726728
727- FROM quay.io/pypa/manylinux_2_28_x86_64 :2025-01-05-75aeda9
729+ FROM quay.io/pypa/manylinux_2_28_${ARCH} :2025.02.02-1
728730
729- LABEL org.opencontainers.image.source=https://github.com/spatial-model-editor/sme_manylinux_x86_64
730- LABEL org.opencontainers.image.description="manylinux x86_64 image for compiling Spatial Model Editor python wheels"
731+ LABEL org.opencontainers.image.source=https://github.com/spatial-model-editor/sme_manylinux
732+ LABEL org.opencontainers.image.description="manylinux ${ARCH} image for compiling Spatial Model Editor python wheels"
731733LABEL org.opencontainers.image.licenses=MIT
732734
733735ARG BUILD_DIR=/opt/smelibs
734736ARG TMP_DIR=/opt/tmpwd
735737
738+ RUN /opt/python/cp312-cp312/bin/pip install ninja \
739+ && ln -fs /opt/python/cp312-cp312/bin/ninja /usr/bin/ninja
740+
736741ARG CCACHE_VERSION="4.10.2"
737742RUN mkdir -p $TMP_DIR && cd $TMP_DIR \
738743 && curl \
739- -L https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}-linux-x86_64 .tar.xz \
744+ -L https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}.tar.xz \
740745 --output ccache.tar.xz \
741746 && tar xJf ccache.tar.xz \
742- && cd ccache-${CCACHE_VERSION}-linux-x86_64 \
743- && make install \
747+ && cd ccache-${CCACHE_VERSION} \
748+ && mkdir build \
749+ && cd build \
750+ && cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_DOCUMENTATION=OFF -DHTTP_STORAGE_BACKEND=OFF -DENABLE_TESTING=OFF -DREDIS_STORAGE_BACKEND=OFF -GNinja .. \
751+ && ninja \
752+ && ninja install \
744753 && rm -rf $TMP_DIR
745754
746- RUN /opt/python/cp312-cp312/bin/pip install ninja \
747- && ln -fs /opt/python/cp312-cp312/bin/ninja /usr/bin/ninja
748-
749755# SME static libs
750756COPY --from=builder $BUILD_DIR $BUILD_DIR
0 commit comments