From c204cd49c952b72ed8d4fa0124281e620f158bfa Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Mon, 21 Jul 2025 16:44:16 -0700 Subject: [PATCH 1/3] add env modules to the spack container to handle custom environment variables --- spack-env/spack.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/spack-env/spack.yaml b/spack-env/spack.yaml index 7050a60..315919c 100644 --- a/spack-env/spack.yaml +++ b/spack-env/spack.yaml @@ -9,6 +9,27 @@ spack: - esmf%gcc@11.4+mpi+netcdf - pfunit%gcc@11.4+esmf+mpi - py-pip%gcc@11.4 + + modules: + default: + exclude_implicits: false + hide_implicits: true + hash_length: 0 + all: + autoload: direct + environment: + set: + `{name}_ROOT`: '{prefix}' + projections: + all: '{name}'/'{version}' + netcdf-c: + environment: + set: + NETCDF: '{prefix}' + netcdf-fortran: + environment: + set: + NETCDF_FORTRAN: '{prefix}' container: format: docker From 293a77ed752ff4597650f79be12672c8518bb6ad Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Mon, 21 Jul 2025 16:50:32 -0700 Subject: [PATCH 2/3] fix quote typo --- spack-env/spack.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spack-env/spack.yaml b/spack-env/spack.yaml index 315919c..8e35d84 100644 --- a/spack-env/spack.yaml +++ b/spack-env/spack.yaml @@ -19,7 +19,7 @@ spack: autoload: direct environment: set: - `{name}_ROOT`: '{prefix}' + '{name}_ROOT': '{prefix}' projections: all: '{name}'/'{version}' netcdf-c: From 283eeca76432bf3741d2b6d07eebff15442f7456 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Mon, 21 Jul 2025 16:52:18 -0700 Subject: [PATCH 3/3] correct string typo again --- spack-env/spack.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spack-env/spack.yaml b/spack-env/spack.yaml index 8e35d84..d88d295 100644 --- a/spack-env/spack.yaml +++ b/spack-env/spack.yaml @@ -21,7 +21,7 @@ spack: set: '{name}_ROOT': '{prefix}' projections: - all: '{name}'/'{version}' + all: '{name}/{version}' netcdf-c: environment: set: