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
@@ -47,16 +49,17 @@ RUN mkdir -p $TMP_DIR && cd $TMP_DIR \
4749 && rm -rf $TMP_DIR
4850
4951ARG GMP_VERSION="6.3.0"
52+ # download url is a temporary workaround for gmp blacklisting github ips
5053RUN mkdir -p $TMP_DIR && cd $TMP_DIR \
5154 && curl -L \
52- https://gmplib.org/ download/gmp /gmp-${GMP_VERSION}.tar.bz2 \
53- --output gmp.tar.bz2 \
54- && tar xjf gmp.tar.bz2 \
55+ https://github.com/spatial-model-editor/spatial-model-editor.github.io/releases/ download/1.0.0 /gmp-${GMP_VERSION}.tar.xz \
56+ --output gmp.tar.xz \
57+ && tar xf gmp.tar.xz \
5558 && cd gmp-${GMP_VERSION} \
5659 && ./configure \
5760 --prefix=$BUILD_DIR \
5861 --disable-shared \
59- --host=x86_64 -unknown-linux-gnu \
62+ --host=${ARCH} -unknown-linux-gnu \
6063 --enable-static \
6164 --with-pic \
6265 --enable-cxx \
@@ -75,7 +78,7 @@ RUN mkdir -p $TMP_DIR && cd $TMP_DIR \
7578 && ./configure \
7679 --prefix=$BUILD_DIR \
7780 --disable-shared \
78- --host=x86_64 -unknown-linux-gnu \
81+ --host=${ARCH} -unknown-linux-gnu \
7982 --enable-static \
8083 --with-pic \
8184 --with-gmp-lib=$BUILD_DIR/lib \
@@ -182,7 +185,7 @@ RUN mkdir -p $TMP_DIR && cd $TMP_DIR \
182185 && ninja install \
183186 && rm -rf $TMP_DIR
184187
185- ARG LLVM_VERSION="19.1.6 "
188+ ARG LLVM_VERSION="19.1.7 "
186189RUN mkdir -p $TMP_DIR && cd $TMP_DIR \
187190 && git clone \
188191 -b llvmorg-$LLVM_VERSION \
@@ -196,7 +199,7 @@ RUN mkdir -p $TMP_DIR && cd $TMP_DIR \
196199 -DCMAKE_BUILD_TYPE=Release \
197200 -DCMAKE_INSTALL_PREFIX=$BUILD_DIR \
198201 -DPython3_EXECUTABLE:FILEPATH=/opt/python/cp312-cp312/bin/python \
199- -DLLVM_DEFAULT_TARGET_TRIPLE=x86_64 -unknown-linux-gnu \
202+ -DLLVM_DEFAULT_TARGET_TRIPLE=${ARCH} -unknown-linux-gnu \
200203 -DLLVM_TARGETS_TO_BUILD="X86" \
201204 -DLLVM_BUILD_TOOLS=OFF \
202205 -DLLVM_INCLUDE_TOOLS=OFF \
@@ -724,27 +727,31 @@ RUN mkdir -p $TMP_DIR && cd $TMP_DIR \
724727 && ninja install \
725728 && rm -rf $TMP_DIR
726729
727- FROM quay.io/pypa/manylinux_2_28_x86_64 :2025-01-05-75aeda9
730+ FROM quay.io/pypa/manylinux_2_28_${ARCH} :2025.02.02-1
728731
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"
732+ LABEL org.opencontainers.image.source=https://github.com/spatial-model-editor/sme_manylinux
733+ LABEL org.opencontainers.image.description="manylinux ${ARCH} image for compiling Spatial Model Editor python wheels"
731734LABEL org.opencontainers.image.licenses=MIT
732735
733736ARG BUILD_DIR=/opt/smelibs
734737ARG TMP_DIR=/opt/tmpwd
735738
739+ RUN /opt/python/cp312-cp312/bin/pip install ninja \
740+ && ln -fs /opt/python/cp312-cp312/bin/ninja /usr/bin/ninja
741+
736742ARG CCACHE_VERSION="4.10.2"
737743RUN mkdir -p $TMP_DIR && cd $TMP_DIR \
738744 && curl \
739- -L https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}-linux-x86_64 .tar.xz \
745+ -L https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}.tar.xz \
740746 --output ccache.tar.xz \
741747 && tar xJf ccache.tar.xz \
742- && cd ccache-${CCACHE_VERSION}-linux-x86_64 \
743- && make install \
748+ && cd ccache-${CCACHE_VERSION} \
749+ && mkdir build \
750+ && cd build \
751+ && cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_DOCUMENTATION=OFF -DHTTP_STORAGE_BACKEND=OFF -DENABLE_TESTING=OFF -DREDIS_STORAGE_BACKEND=OFF -GNinja .. \
752+ && ninja \
753+ && ninja install \
744754 && rm -rf $TMP_DIR
745755
746- RUN /opt/python/cp312-cp312/bin/pip install ninja \
747- && ln -fs /opt/python/cp312-cp312/bin/ninja /usr/bin/ninja
748-
749756# SME static libs
750757COPY --from=builder $BUILD_DIR $BUILD_DIR
0 commit comments