|
4 | 4 |
|
5 | 5 | FROM ubuntu:24.04 |
6 | 6 |
|
| 7 | +ARG TARGETARCH |
| 8 | + |
7 | 9 | ##################### |
8 | 10 | # base deps |
9 | 11 | ##################### |
@@ -57,52 +59,72 @@ RUN apt-get update && apt-get -y install \ |
57 | 59 |
|
58 | 60 | # manual mpich install |
59 | 61 | # https://github.com/actions/runner-images/issues/13204 |
60 | | -RUN curl -LO https://launchpad.net/ubuntu/+source/mpich/4.2.0-5.1/+build/28285882/+files/libmpich12_4.2.0-5.1_amd64.deb |
61 | | -RUN curl -LO https://launchpad.net/ubuntu/+source/mpich/4.2.0-5.1/+build/28285882/+files/mpich_4.2.0-5.1_amd64.deb |
62 | | -RUN curl -LO https://launchpad.net/ubuntu/+source/mpich/4.2.0-5.1/+build/28285882/+files/libmpich-dev_4.2.0-5.1_amd64.deb |
| 62 | +# |
| 63 | +# amd64: curl -LO https://launchpad.net/ubuntu/+source/mpich/4.2.0-5.1/+build/28285882/ |
| 64 | +# arm64: curl -LO https://launchpad.net/ubuntu/+source/mpich/4.2.0-5.1/+build/28285883/ |
| 65 | + |
| 66 | +RUN case "$TARGETARCH" in \ |
| 67 | + "amd64") BUILD_NUM="28285882" ;; \ |
| 68 | + "arm64") BUILD_NUM="28285883" ;; \ |
| 69 | + esac; \ |
| 70 | + curl -LO https://launchpad.net/ubuntu/+source/mpich/4.2.0-5.1/+build/${BUILD_NUM}/+files/libmpich12_4.2.0-5.1_${TARGETARCH}.deb |
| 71 | + |
| 72 | +RUN case "$TARGETARCH" in \ |
| 73 | + "amd64") BUILD_NUM="28285882" ;; \ |
| 74 | + "arm64") BUILD_NUM="28285883" ;; \ |
| 75 | + esac; \ |
| 76 | + curl -LO https://launchpad.net/ubuntu/+source/mpich/4.2.0-5.1/+build/${BUILD_NUM}/+files/mpich_4.2.0-5.1_${TARGETARCH}.deb |
| 77 | + |
| 78 | +RUN case "$TARGETARCH" in \ |
| 79 | + "amd64") BUILD_NUM="28285882" ;; \ |
| 80 | + "arm64") BUILD_NUM="28285883" ;; \ |
| 81 | + esac; \ |
| 82 | + curl -LO https://launchpad.net/ubuntu/+source/mpich/4.2.0-5.1/+build/${BUILD_NUM}/+files/libmpich-dev_4.2.0-5.1_${TARGETARCH}.deb |
| 83 | + |
63 | 84 |
|
64 | | -RUN apt install -y ./libmpich12_4.2.0-5.1_amd64.deb |
65 | | -RUN apt install -y ./mpich_4.2.0-5.1_amd64.deb |
66 | | -RUN apt install -y ./libmpich-dev_4.2.0-5.1_amd64.deb |
| 85 | +RUN apt install -y ./libmpich12_4.2.0-5.1_${TARGETARCH}.deb |
| 86 | +RUN apt install -y ./mpich_4.2.0-5.1_${TARGETARCH}.deb |
| 87 | +RUN apt install -y ./libmpich-dev_4.2.0-5.1_${TARGETARCH}.deb |
67 | 88 |
|
68 | 89 | RUN rm -rf /var/lib/apt/lists/* |
69 | 90 |
|
70 | | -# untar the current source (created as part of example_build.sh) |
| 91 | +# untar the current source (created as part of build.sh) |
71 | 92 | COPY conduit.docker.src.tar / |
72 | 93 | RUN tar -xf conduit.docker.src.tar |
73 | 94 |
|
74 | 95 | # if you would like to clone conduit directly, you can use: |
75 | 96 | #RUN git clone --depth 1 https://github.com/LLNL/conduit.git |
76 | 97 |
|
77 | | -# at some sites ssl certs are intercepted, which cases issues fetching |
| 98 | +# at some sites ssl certs are intercepted, which cases issues fetching |
78 | 99 | # tpl sources via https |
79 | 100 |
|
80 | 101 | # to resolve this, either: |
81 | | -# 1) pass the "-k" option to uberenv (recommended), |
| 102 | +# 1) pass the "-k" option to uberenv (recommended), |
82 | 103 | # 2) install the proper certs into the image, or |
83 | | -# 3) use the following commands to disable ssl for git and |
| 104 | +# 3) use the following commands to disable ssl for git and |
84 | 105 | # curl (both are used by spack): |
85 | 106 | #RUN git config --global http.sslVerify false |
86 | 107 | #RUN echo insecure >> ~/.curlrc |
87 | 108 |
|
88 | 109 | # bootstrap third party libs using spack and uberenv |
89 | 110 | RUN cd conduit && python3 scripts/uberenv/uberenv.py \ |
90 | 111 | -k \ |
| 112 | + --prefix=/uberenv_libs \ |
91 | 113 | --spec "+mpi%gcc" \ |
92 | 114 | --spack-env-file=scripts/uberenv_configs/spack_configs/envs/ubuntu-24.04/spack.yaml |
93 | 115 |
|
94 | 116 | # configure a debug build with cmake |
95 | 117 | RUN cd conduit && \ |
96 | | - uberenv_libs/spack/opt/spack/*/cmake-*/bin/cmake \ |
97 | | - -DCMAKE_BUILD_TYPE=Debug \ |
98 | | - -DCMAKE_INSTALL_PREFIX=/conduit/install-debug \ |
99 | | - -C /conduit/uberenv_libs/*-patch.cmake \ |
100 | | - -B build-debug -S src |
| 118 | + /uberenv_libs/spack/opt/spack/*/cmake-*/bin/cmake \ |
| 119 | + -DCMAKE_BUILD_TYPE=Release \ |
| 120 | + -DCMAKE_INSTALL_PREFIX=/conduit/install \ |
| 121 | + -C /uberenv_libs/*-patch.cmake \ |
| 122 | + -B build -S src |
101 | 123 |
|
102 | 124 | # build, test, and install conduit |
103 | | -RUN cd conduit/build-debug && make |
104 | | -RUN cd conduit/build-debug && env make test |
105 | | -RUN cd conduit/build-debug && make install |
| 125 | +RUN cmake --build conduit/build --config Release |
| 126 | +RUN cmake -E env CTEST_OUTPUT_ON_FAILURE=1 cmake --build conduit/build |
| 127 | +RUN cmake --install conduit/build --config Release |
106 | 128 |
|
107 | 129 | # open port 9000, for use by conduit relay |
108 | 130 | EXPOSE 9000 |
|
0 commit comments