From f1d5106c95c04cd6da87e082fe1ef94cd3cbe4f2 Mon Sep 17 00:00:00 2001 From: Theodore Chang Date: Wed, 11 Dec 2024 13:26:33 +0100 Subject: [PATCH] [skip.all] Minor update --- Script/Rocky.Pre.arm64.Dockerfile | 2 +- Script/Rocky.arm64.Dockerfile | 27 ++++++++++----------------- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/Script/Rocky.Pre.arm64.Dockerfile b/Script/Rocky.Pre.arm64.Dockerfile index 915e2c8b..07894aab 100644 --- a/Script/Rocky.Pre.arm64.Dockerfile +++ b/Script/Rocky.Pre.arm64.Dockerfile @@ -1,4 +1,4 @@ -FROM arm64v8/rockylinux:9 AS build +FROM --platform=arm64 rockylinux:9 AS build RUN dnf install -y epel-release && crb enable RUN dnf install -y gcc g++ gfortran cmake wget git hdf5-devel diff --git a/Script/Rocky.arm64.Dockerfile b/Script/Rocky.arm64.Dockerfile index 82ebab19..5386c337 100644 --- a/Script/Rocky.arm64.Dockerfile +++ b/Script/Rocky.arm64.Dockerfile @@ -1,32 +1,25 @@ -FROM arm64v8/rockylinux:9 AS build - -RUN dnf install -y epel-release && crb enable -RUN dnf install -y gcc g++ gfortran cmake wget git hdf5-devel - -# part 1: openblas -RUN git clone --depth 1 --branch v0.3.28 https://github.com/OpenMathLib/OpenBLAS.git - -# change the following configurations to match your needs -RUN cd OpenBLAS && make TARGET=ARMV8 DYNAMIC_ARCH=1 BINARY=64 USE_THREAD=1 USE_OPENMP=1 NUM_THREADS=20 NO_SHARED=1 NO_CBLAS=1 NO_LAPACKE=1 GEMM_MULTITHREAD_THRESHOLD=64 - -# part 2: tbb -RUN git clone --depth 1 --branch v2021.12.0 https://github.com/oneapi-src/oneTBB.git -RUN mkdir tbb-build && cd tbb-build && cmake -DCMAKE_BUILD_TYPE=Release -DTBB_TEST=OFF ../oneTBB && cmake --build . --target install --config Release --parallel "$(nproc)" +FROM --platform=arm64 tlcfem/suanpan-env:latest AS build # part 3: suanpan RUN git clone --depth 1 --branch dev https://github.com/TLCFEM/suanPan.git RUN cd suanPan && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DUSE_SYS_LIB=ON -DCUSTOM_OPENBLAS=/OpenBLAS -DBUILD_MULTITHREAD=ON -DUSE_HDF5=ON -DUSE_VTK=OFF -DUSE_AVX2=OFF .. && make -j"$(nproc)" -FROM arm64v8/rockylinux:9 AS runtime +FROM --platform=arm64 rockylinux:9 AS runtime RUN dnf install -y epel-release && crb enable RUN dnf install -y libgomp hdf5 COPY --from=build /tbb-build /tbb-build -RUN cd /tbb-build && make install && cd .. && rm -rf tbb-build +RUN find /tbb-build -name "libtbb*.so*" -exec cp {} /usr/local/lib64 \; + +RUN rm -rf tbb-build COPY --from=build /suanPan/build/suanPan /usr/local/bin/suanPan -RUN suanPan -v +RUN ln -s /usr/local/bin/suanPan /usr/local/bin/suanpan +RUN ln -s /usr/local/bin/suanPan /usr/local/bin/sp + +RUN sp -v +