|
1 | 1 | FROM rockylinux:9 |
2 | 2 |
|
| 3 | +# Ensure commands fail on error |
| 4 | +SHELL ["/bin/bash", "-o", "pipefail", "-c"] |
| 5 | + |
3 | 6 | # Install dependencies |
4 | | -RUN dnf -y update; dnf clean all; \ |
5 | | - dnf config-manager --set-enabled crb; \ |
6 | | - dnf -y install git make cmake wget unzip patch which file; \ |
7 | | - dnf -y install gcc gcc-c++ gcc-gfortran lapack-devel; \ |
8 | | - dnf -y install python3 python-devel findutils diffutils patchelf; |
| 7 | +RUN dnf -y update \ |
| 8 | + && dnf -y install dnf-plugins-core \ |
| 9 | + && dnf config-manager --set-enabled crb \ |
| 10 | + && dnf -y install epel-release \ |
| 11 | + && dnf -y install \ |
| 12 | + git make cmake wget unzip patch which file \ |
| 13 | + gcc gcc-c++ gcc-gfortran lapack-devel \ |
| 14 | + python3 python3-devel findutils diffutils patchelf \ |
| 15 | + && dnf clean all |
9 | 16 |
|
10 | | -# Fix the symlinks: https://bugs.rockylinux.org/view.php?id=7855 |
11 | | -RUN cd /usr/lib64; \ |
12 | | - ln -sf libblas.so.3.9.0 libblas.so.3; \ |
13 | | - ln -sf liblapack.so.3.9.0 liblapack.so.3; |
| 17 | +# Fix LAPACK/BLAS symlinks |
| 18 | +# See: https://bugs.rockylinux.org/view.php?id=7855 |
| 19 | +RUN cd /usr/lib64 \ |
| 20 | + && ln -sf libblas.so.3.9.0 libblas.so.3 \ |
| 21 | + && ln -sf liblapack.so.3.9.0 liblapack.so.3 |
14 | 22 |
|
15 | 23 | # Create directory structure |
16 | | -RUN mkdir repo |
| 24 | +RUN mkdir -p /repo |
| 25 | + |
| 26 | +# Copy the coinhsl.tar.gz file into the repo folder |
| 27 | +# COPY ./hsl/coinhsl.tar.gz /repo/coinhsl.tar.gz |
17 | 28 |
|
18 | 29 | # Install PETSc |
19 | | -RUN cd repo; \ |
20 | | - wget https://gitlab.com/petsc/petsc/-/archive/v3.20.6/petsc-v3.20.6.tar.gz; \ |
21 | | - tar -zxvf petsc-v3.20.6.tar.gz; \ |
22 | | - mv petsc-v3.20.6 petsc; \ |
23 | | - mkdir petsc-dist; \ |
24 | | - cd petsc; \ |
25 | | - ./configure configure --with-debug=0 --with-shared=0 --with-mpi=0 --with-fortran-bindings=0 --download-metis --download-mumps --with-mumps-serial=1 --prefix=/repo/petsc-dist; \ |
26 | | - make;\ |
27 | | - make install; |
| 30 | +RUN cd /repo \ |
| 31 | + && wget https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-3.20.6.tar.gz \ |
| 32 | + && tar -zxvf petsc-3.20.6.tar.gz \ |
| 33 | + && mv petsc-3.20.6 petsc \ |
| 34 | + && mkdir petsc-dist \ |
| 35 | + && cd petsc \ |
| 36 | + && ./configure --with-debug=0 --with-shared=0 --with-mpi=0 --with-fortran-bindings=0 \ |
| 37 | + --download-metis --download-mumps --with-mumps-serial=1 \ |
| 38 | + --prefix=/repo/petsc-dist \ |
| 39 | + && make \ |
| 40 | + && make install |
28 | 41 |
|
29 | 42 | # Install boost |
30 | | -RUN cd repo; \ |
31 | | - wget https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz; \ |
32 | | - tar -zxvf boost_1_87_0.tar.gz; \ |
33 | | - cd ./boost_1_87_0; \ |
34 | | - sh bootstrap.sh --prefix=/usr/local/; \ |
35 | | - chmod a+x ./b2; \ |
36 | | - ./b2 install || true; |
37 | | - |
38 | | - |
| 43 | +RUN cd /repo \ |
| 44 | + && wget https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz \ |
| 45 | + && tar -zxvf boost_1_87_0.tar.gz \ |
| 46 | + && cd boost_1_87_0 \ |
| 47 | + && sh bootstrap.sh --prefix=/usr/local \ |
| 48 | + && chmod a+x ./b2 \ |
| 49 | + && ./b2 install |
0 commit comments