From ea7428b463a5155395c8d4a451342407ed923daf Mon Sep 17 00:00:00 2001 From: Brian Han Date: Thu, 8 Feb 2024 13:28:39 -0800 Subject: [PATCH 1/5] Add dependencies for pygeosx unit tests --- docker/tpl-ubuntu-gcc.Dockerfile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docker/tpl-ubuntu-gcc.Dockerfile b/docker/tpl-ubuntu-gcc.Dockerfile index 5560da55..bd1cbe99 100644 --- a/docker/tpl-ubuntu-gcc.Dockerfile +++ b/docker/tpl-ubuntu-gcc.Dockerfile @@ -136,8 +136,8 @@ COPY --from=tpl_toolchain /spack-generated.cmake / # Any tool specific to building GEOSX shall be installed in this stage. RUN DEBIAN_FRONTEND=noninteractive TZ=America/Los_Angeles \ - apt-get install -y --no-install-recommends \ - openssh-client \ + apt-get install -y --no-install-recommends \ + openssh-client \ # `ca-certificates` is needed by `sccache` to download the cached compilations. ca-certificates \ curl \ @@ -148,7 +148,15 @@ RUN DEBIAN_FRONTEND=noninteractive TZ=America/Los_Angeles \ libxml2-utils \ git \ ghostscript \ - ninja-build + ninja-build \ + python3 \ + python3-dev \ + python3-mpi4py \ + python3-scipy \ + python3-virtualenv \ + python3-matplotlib \ + python3-venv \ + python3-pytest # Install `sccache` binaries to speed up the build of `geos` RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-sccache.sh From c758d40295886002118be655b58083b73b90b052 Mon Sep 17 00:00:00 2001 From: Brian Han Date: Wed, 20 Mar 2024 15:50:09 -0700 Subject: [PATCH 2/5] Cleanup dupe python3 dependency --- docker/tpl-ubuntu-gcc.Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/docker/tpl-ubuntu-gcc.Dockerfile b/docker/tpl-ubuntu-gcc.Dockerfile index bd1cbe99..398955fc 100644 --- a/docker/tpl-ubuntu-gcc.Dockerfile +++ b/docker/tpl-ubuntu-gcc.Dockerfile @@ -149,7 +149,6 @@ RUN DEBIAN_FRONTEND=noninteractive TZ=America/Los_Angeles \ git \ ghostscript \ ninja-build \ - python3 \ python3-dev \ python3-mpi4py \ python3-scipy \ From af8d6e80806f72e14dd7f7a40f5c3c980ca8e1d2 Mon Sep 17 00:00:00 2001 From: Brian Han Date: Thu, 10 Apr 2025 08:54:52 -0700 Subject: [PATCH 3/5] ENABLE_PYLVARRAY unit tests when +pygeosx --- scripts/spack_packages/packages/geosx/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/spack_packages/packages/geosx/package.py b/scripts/spack_packages/packages/geosx/package.py index e02d5321..0a259162 100644 --- a/scripts/spack_packages/packages/geosx/package.py +++ b/scripts/spack_packages/packages/geosx/package.py @@ -555,6 +555,7 @@ def geos_hostconfig(self, spec, prefix, py_site_pkgs_dir=None): if '+pygeosx' in spec: cfg.write(cmake_cache_option('ENABLE_PYGEOSX', True)) + cfg.write(cmake_cache_option('ENABLE_PYLVARRAY', True)) else: cfg.write(cmake_cache_option('ENABLE_PYGEOSX', False)) From 37ed05a58e64d602bf6fe8b78b777fa56264a896 Mon Sep 17 00:00:00 2001 From: Brian Han Date: Thu, 15 May 2025 08:20:36 -0700 Subject: [PATCH 4/5] Try newer scipy/numpy through pip --- docker/tpl-ubuntu-clang.Dockerfile | 5 ++++- docker/tpl-ubuntu-gcc.Dockerfile | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docker/tpl-ubuntu-clang.Dockerfile b/docker/tpl-ubuntu-clang.Dockerfile index d4bb74ce..cd5eded5 100644 --- a/docker/tpl-ubuntu-clang.Dockerfile +++ b/docker/tpl-ubuntu-clang.Dockerfile @@ -113,11 +113,14 @@ RUN DEBIAN_FRONTEND=noninteractive TZ=America/Los_Angeles \ python3-dev \ python3-sphinx \ python3-mpi4py \ - python3-scipy \ python3-virtualenv \ python3-matplotlib \ python3-venv \ python3-pytest +# Install newer scipy/numpy through pip +RUN python3 -m pip install --upgrade pip && \ + python3 -m pip install scipy + RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-sccache.sh ENV SCCACHE=/opt/sccache/bin/sccache diff --git a/docker/tpl-ubuntu-gcc.Dockerfile b/docker/tpl-ubuntu-gcc.Dockerfile index 398955fc..ee074694 100644 --- a/docker/tpl-ubuntu-gcc.Dockerfile +++ b/docker/tpl-ubuntu-gcc.Dockerfile @@ -151,12 +151,15 @@ RUN DEBIAN_FRONTEND=noninteractive TZ=America/Los_Angeles \ ninja-build \ python3-dev \ python3-mpi4py \ - python3-scipy \ python3-virtualenv \ python3-matplotlib \ python3-venv \ python3-pytest +# Install newer scipy/numpy through pip +RUN python3 -m pip install --upgrade pip && \ + python3 -m pip install scipy + # Install `sccache` binaries to speed up the build of `geos` RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-sccache.sh ENV SCCACHE=/opt/sccache/bin/sccache From 212d830fe2219d04af3dfb630b808f0c1cd6f145 Mon Sep 17 00:00:00 2001 From: Brian Han Date: Thu, 15 May 2025 14:31:24 -0700 Subject: [PATCH 5/5] Uninstalled older scipy/numpy first --- docker/tpl-ubuntu-clang.Dockerfile | 8 +++++--- docker/tpl-ubuntu-gcc.Dockerfile | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docker/tpl-ubuntu-clang.Dockerfile b/docker/tpl-ubuntu-clang.Dockerfile index cd5eded5..8f84d471 100644 --- a/docker/tpl-ubuntu-clang.Dockerfile +++ b/docker/tpl-ubuntu-clang.Dockerfile @@ -118,9 +118,11 @@ RUN DEBIAN_FRONTEND=noninteractive TZ=America/Los_Angeles \ python3-venv \ python3-pytest -# Install newer scipy/numpy through pip -RUN python3 -m pip install --upgrade pip && \ - python3 -m pip install scipy +# Remove older scipy/numpy and re-install newer scipy/numpy through pip +# (matplotlib needs to be reinstalled as well) +RUN apt remove -y python3-numpy python3-scipy && \ + python3 -m pip install --upgrade pip && \ + python3 -m pip install scipy matplotlib RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-sccache.sh ENV SCCACHE=/opt/sccache/bin/sccache diff --git a/docker/tpl-ubuntu-gcc.Dockerfile b/docker/tpl-ubuntu-gcc.Dockerfile index ee074694..d7f1b1f2 100644 --- a/docker/tpl-ubuntu-gcc.Dockerfile +++ b/docker/tpl-ubuntu-gcc.Dockerfile @@ -156,9 +156,11 @@ RUN DEBIAN_FRONTEND=noninteractive TZ=America/Los_Angeles \ python3-venv \ python3-pytest -# Install newer scipy/numpy through pip -RUN python3 -m pip install --upgrade pip && \ - python3 -m pip install scipy +# Remove older scipy/numpy and re-install newer scipy/numpy through pip +# (matplotlib needs to be reinstalled as well) +RUN apt remove -y python3-numpy python3-scipy && \ + python3 -m pip install --upgrade pip && \ + python3 -m pip install scipy matplotlib # Install `sccache` binaries to speed up the build of `geos` RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-sccache.sh