Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# .dockerignore

# Log files.
log.*
*.log

# spack-stack environments and builds.
envs/
.env/
build/
cache/

# Misc.
.vscode
.Trashes
.github/
venv/
.venv/

6 changes: 4 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
branch = spack-stack-dev
[submodule "repos/builtin"]
path = repos/builtin
url = https://github.com/jcsda/spack-packages
branch = spack-stack-dev
#url = https://github.com/jcsda/spack-packages
#branch = spack-stack-dev
url = https://github.com/climbfuji/spack-packages
branch = feature/merge_rel21_into_spack_stack_dev
39 changes: 30 additions & 9 deletions configs/sites/tier1/container/Dockerfile.gcc
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ RUN set -euo pipefail; \
# External dependencies.
libcurl4-openssl-dev \
libmysqlclient-dev \
libqt5svg5-dev \
qt5-qmake \
qt5dxcb-plugin \
qtbase5-dev \
zstd \
# Shell tools, source retrieval and networking.
sed \
Expand Down Expand Up @@ -72,10 +68,15 @@ FROM ubuntu_base AS builder
ENV SPACK_STACK_DIR=/opt/spack-stack \
SPACK_ROOT=/opt/spack-stack/spack


# Copy spack-stack from build context. Note the build context must be the
# root of the spack-stack repository (see the README.md for details).
COPY . ${SPACK_STACK_DIR}
# Do not copy the dockerfiles into the container.
COPY --exclude=configs/sites/tier1/container/Dockerfile.oneapi \
--exclude=configs/sites/tier1/container/Dockerfile.gcc \
--exclude=configs/sites/tier1/container/packages_oneapi.yaml \
--exclude=envs/** \
--exclude=cache/** \
. ${SPACK_STACK_DIR}

# Create spack-stack environment
WORKDIR /opt/spack-stack
Expand All @@ -89,12 +90,19 @@ RUN mkdir -p /tmp/spack-stack && \
--compiler $COMPILER && \
cd ${SPACK_STACK_DIR}/envs/container && \
spack env activate . && \
spack concretize 2>&1 | tee log.concretize && \
spack install --fail-fast -j ${BUILD_JOBS} 2>&1 | tee log.install && \
spack concretize 2>&1 | tee log.concretize

# Build the spack environment.
RUN source setup.sh && cd ${SPACK_STACK_DIR}/envs/container && spack env activate . && \
spack install --fail-fast -j ${BUILD_JOBS} 2>&1 | tee log.install

# Setup modules and meta-modules.
RUN source setup.sh && cd ${SPACK_STACK_DIR}/envs/container && spack env activate . && \
spack module tcl refresh -y && \
spack stack setup-meta-modules && \
# Save output of spack find.
spack find 2>&1 | tee /opt/spack-software/spack_find.out && \
cp ./log.concretize /opt/spack-software/log.concretize && \
spack clean --all

## ---------- Create runtime container ----------
Expand All @@ -118,7 +126,20 @@ RUN echo "ulimit -s unlimited" > /etc/spack_container_rc.sh \
&& echo "export PRTE_MCA_rmaps_default_mapping_policy=:oversubscribe" >> /etc/spack_container_rc.sh \
&& echo "# TCL module path for the spack-stack environment." >> /etc/spack_container_rc.sh \
&& echo "source /etc/profile.d/modules.sh" >> /etc/spack_container_rc.sh \
&& echo "module use /opt/spack-software/modules/Core" >> /etc/spack_container_rc.sh \
&& echo "module use /opt/spack-software/modulefiles" >> /etc/spack_container_rc.sh \
&& echo "module use /opt/spack-software/modulefiles/Core" >> /etc/spack_container_rc.sh \
&& echo "# Bash function to load modules necessary to build the JEDI bundle." >> /etc/spack_container_rc.sh \
&& echo "load_jedi_bundle_env() {" >> /etc/spack_container_rc.sh \
&& echo " module purge" >> /etc/spack_container_rc.sh \
&& echo " module load stack-gcc" >> /etc/spack_container_rc.sh \
&& echo " module load stack-openmpi" >> /etc/spack_container_rc.sh \
&& echo " module load base-env" >> /etc/spack_container_rc.sh \
&& echo " module load jedi-mpas-env" >> /etc/spack_container_rc.sh \
&& echo " module load py-fortranformat" >> /etc/spack_container_rc.sh \
&& echo " module load jedi-fv3-env" >> /etc/spack_container_rc.sh \
&& echo " module load ewok-env" >> /etc/spack_container_rc.sh \
&& echo " module load ip" >> /etc/spack_container_rc.sh \
&& echo "}" >> /etc/spack_container_rc.sh \ \
&& echo "source /etc/spack_container_rc.sh" >> /etc/bash.bashrc \
&& printf "[credential]\n helper = cache --timeout=7200\n" >> /root/.gitconfig \
&& mkdir /root/.pmix \
Expand Down
39 changes: 30 additions & 9 deletions configs/sites/tier1/container/Dockerfile.oneapi
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ RUN set -euo pipefail; \
# External dependencies.
libcurl4-openssl-dev \
libmysqlclient-dev \
libqt5svg5-dev \
qt5-qmake \
qt5dxcb-plugin \
qtbase5-dev \
zstd \
# Shell tools, source retrieval and networking.
sed \
Expand Down Expand Up @@ -91,7 +87,13 @@ ENV SPACK_STACK_DIR=/opt/spack-stack \

# Copy spack-stack from build context. Note the build context must be the
# root of the spack-stack repository (see the README.md for details).
COPY . ${SPACK_STACK_DIR}
# Do not copy the dockerfiles into the container.
COPY --exclude=configs/sites/tier1/container/Dockerfile.oneapi \
--exclude=configs/sites/tier1/container/Dockerfile.gcc \
--exclude=configs/sites/tier1/container/packages_gcc.yaml \
--exclude=envs/** \
--exclude=cache/** \
. ${SPACK_STACK_DIR}

# Create spack-stack environment
WORKDIR /opt/spack-stack
Expand All @@ -105,12 +107,19 @@ RUN mkdir -p /tmp/spack-stack && \
--compiler oneapi && \
cd ${SPACK_STACK_DIR}/envs/container && \
spack env activate . && \
spack concretize 2>&1 | tee log.concretize && \
spack install --fail-fast -j ${BUILD_JOBS} 2>&1 | tee log.install && \
spack concretize 2>&1 | tee log.concretize

# Build the spack environment.
RUN source setup.sh && cd ${SPACK_STACK_DIR}/envs/container && spack env activate . && \
spack install --fail-fast -j ${BUILD_JOBS} 2>&1 | tee log.install

# Setup modules and meta-modules.
RUN source setup.sh && cd ${SPACK_STACK_DIR}/envs/container && spack env activate . && \
spack module tcl refresh -y && \
spack stack setup-meta-modules && \
# Save output of spack find.
spack find 2>&1 | tee /opt/spack-software/spack_find.out && \
cp ./log.concretize /opt/spack-software/log.concretize && \
spack clean --all

## ---------- Create runtime container ----------
Expand All @@ -129,10 +138,22 @@ RUN echo "ulimit -s unlimited" > /etc/spack_container_rc.sh \
&& echo "export CXX=icpx" >> /etc/spack_container_rc.sh \
&& echo "export FC=ifx" >> /etc/spack_container_rc.sh \
&& echo "# TCL module path for the spack-stack environment." >> /etc/spack_container_rc.sh \
&& echo "export MODULEPATH=/opt/spack-software/modules/Core" >> /etc/spack_container_rc.sh \
&& echo "source /etc/profile.d/modules.sh" >> /etc/spack_container_rc.sh \
&& echo "module use /opt/intel/oneapi/modulefiles" >> /etc/spack_container_rc.sh \
&& echo "module use /opt/spack-software/modules/Core" >> /etc/spack_container_rc.sh \
&& echo "module use /opt/spack-software/modulefiles" >> /etc/spack_container_rc.sh \
&& echo "module use /opt/spack-software/modulefiles/Core" >> /etc/spack_container_rc.sh \
&& echo "# Bash function to load modules necessary to build the JEDI bundle." >> /etc/spack_container_rc.sh \
&& echo "load_jedi_bundle_env() {" >> /etc/spack_container_rc.sh \
&& echo " module purge" >> /etc/spack_container_rc.sh \
&& echo " module load stack-intel-oneapi-compilers" >> /etc/spack_container_rc.sh \
&& echo " module load stack-intel-oneapi-mpi" >> /etc/spack_container_rc.sh \
&& echo " module load base-env" >> /etc/spack_container_rc.sh \
&& echo " module load jedi-mpas-env" >> /etc/spack_container_rc.sh \
&& echo " module load py-fortranformat" >> /etc/spack_container_rc.sh \
&& echo " module load jedi-fv3-env" >> /etc/spack_container_rc.sh \
&& echo " module load ewok-env" >> /etc/spack_container_rc.sh \
&& echo " module load ip" >> /etc/spack_container_rc.sh \
&& echo "}" >> /etc/spack_container_rc.sh \ \
&& echo "source /etc/spack_container_rc.sh" >> /etc/bash.bashrc \
&& printf "[credential]\n helper = cache --timeout=7200\n" >> /root/.gitconfig \
&& mkdir /root/.pmix
Expand Down
63 changes: 40 additions & 23 deletions configs/sites/tier1/container/packages.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,54 @@
packages:
all:
target: [core2]
target: [x86_64_v3]
awscli-v2:
require:
- "@2.22.4"
cairo:
variants: +pic
ewok-env:
require:
- +ecflow
fontconfig:
variants: +pic
met:
variants: +python +grib2 +graphics +lidar2nc +modis
parallelio:
require:
- +pnetcdf
pixman:
variants: +pic
py-awscrt:
require:
- "@0.19.19"
py-botocore:
require:
- "@1.34.162"
py-boto3:
require:
- "@1.34.162"
py-netcdf4:
require:
- "@1.7.2"

# System packages installed during the container build.
grep:
externals:
- spec: grep@3.11
prefix: /usr
findutils:
autoconf:
externals:
- spec: findutils@4.9.0
- spec: autoconf@2.71
prefix: /usr
coreutils:
externals:
- spec: coreutils@9.4
prefix: /usr
autoconf:
externals:
- spec: autoconf@2.71
prefix: /usr
diffutils:
buildable: false
externals:
- spec: diffutils@3.10
prefix: /usr
findutils:
externals:
- spec: findutils@4.9.0
prefix: /usr
git:
buildable: false
externals:
Expand All @@ -35,24 +59,17 @@ packages:
externals:
- spec: git-lfs@3.4.1
prefix: /usr
llvm:
buildable: false
externals:
- spec: llvm@14.0.6
prefix: /usr
qt:
buildable: false
grep:
externals:
- spec: qt@5.15.3
- spec: grep@3.11
prefix: /usr
version: [5.15.3]
wget:
llvm:
buildable: false
externals:
- spec: wget@1.21.4
- spec: llvm@14.0.6
prefix: /usr
perl:
buildable: false
externals:
- spec: perl@5.38.2
prefix: /usr
prefix: /usr
4 changes: 2 additions & 2 deletions configs/sites/tier1/container/packages_oneapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ packages:
modules:
- umf/1.0.2
- tbb/2022.3
- compiler-rt/2025.3.0
- compiler/2025.3.0
- compiler-rt/2025.3.2
- compiler/2025.3.2
extra_attributes:
compilers:
c: /opt/intel/oneapi/compiler/2025.3/bin/icx
Expand Down
7 changes: 4 additions & 3 deletions configs/sites/tier1/derecho/packages.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
packages:
# Modification of common packages
zlib-api:
buildable: False
all:
providers:
zlib-api:: [zlib]
# Tell esmf that this is not a 'normal' Cray ...
esmf:
require:
Expand Down Expand Up @@ -113,5 +114,5 @@ packages:
zlib:
buildable: False
externals:
- spec: zlib@1.2.11
- spec: zlib@1.2.13
prefix: /usr
3 changes: 3 additions & 0 deletions configs/sites/tier1/derecho/packages_gcc-13.3.1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ packages:
- spec: cray-mpich@8.1.32 +wrappers
prefix: /opt/cray/pe/mpich/8.1.32/ofi/gnu/12.3
modules:
- crayenv/25.03
- PrgEnv-gnu/8.6.0
- gcc-native/13.2
- craype-network-ofi
- cray-mpich/8.1.32
- libfabric/1.22.0
Expand Down
9 changes: 6 additions & 3 deletions configs/sites/tier1/derecho/packages_oneapi-2025.3.1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ packages:
- spec: intel-oneapi-compilers@2025.3.1
prefix: /glade/work/epicufsrt/contrib/spack-stack/derecho/installs/oneapi-2025.3.1
modules:
- crayenv/25.03
- PrgEnv-intel/8.6.0
- intel/2025.3.1
- crayenv/25.03
- PrgEnv-intel/8.6.0
- intel/2025.3.1
extra_attributes:
compilers:
c: /glade/work/epicufsrt/contrib/spack-stack/derecho/installs/oneapi-2025.3.1/compiler/2025.3/bin/icx
Expand Down Expand Up @@ -54,6 +54,9 @@ packages:
- spec: cray-mpich@8.1.32 +wrappers
prefix: /opt/cray/pe/mpich/8.1.32/ofi/intel/2022.1
modules:
- crayenv/25.03
- PrgEnv-intel/8.6.0
- intel/2025.3.1
- craype-network-ofi
- cray-mpich/8.1.32
- libfabric/1.22.0
Expand Down
18 changes: 1 addition & 17 deletions configs/sites/tier1/discover-scu17/mirrors.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,2 @@
mirrors:
local-source:
fetch:
url: file:///discover/swdev/jcsda/spack-stack/source-cache
access_pair:
- null
- null
access_token: null
profile: null
endpoint_url: null
push:
url: file:///discover/swdev/jcsda/spack-stack/source-cache
access_pair:
- null
- null
access_token: null
profile: null
endpoint_url: null
local-source: file:///discover/swdev/jcsda/spack-stack/source-cache
3 changes: 3 additions & 0 deletions configs/sites/tier1/discover-scu17/packages.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
packages:
### Modification of common packages
ewok-env:
require:
- '+ecflow'
# Problems building shared hdf-eos2 with Intel, not needed
hdf-eos2:
variants: ~shared
Expand Down
2 changes: 1 addition & 1 deletion configs/sites/tier1/discover-scu17/packages_gcc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ packages:
openmpi:
buildable: False
externals:
- spec: openmpi@4.1.6 ~cuda~cxx~cxx_exceptions~java~memchecker+pmi~static~wrapper-rpath
- spec: openmpi@4.1.6 ~cuda~cxx~cxx_exceptions~java~memchecker+pmi~static~wrapper-rpath+two_level_namespace
fabrics=ucx schedulers=slurm
prefix: /discover/swdev/gmao_SIteam/MPI/openmpi/4.1.6-SLES15/gcc-13.4.0
modules:
Expand Down
7 changes: 5 additions & 2 deletions configs/sites/tier1/discover-scu17/packages_oneapi.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
packages:
all:
prefer:
- '%oneapi'
providers:
mpi:: [intel-oneapi-mpi@2021.13]
mpi:
Expand Down Expand Up @@ -28,15 +30,16 @@ packages:
extra_rpaths:
- /usr/local/other/gcc/12.3.0/lib64
intel-oneapi-mpi:
buildable: False
externals:
- spec: intel-oneapi-mpi@2021.13%oneapi@2024.2.0
- spec: intel-oneapi-mpi@2021.13
prefix: /usr/local/intel/oneapi/2024
modules:
- mpi/impi/2021.13
intel-oneapi-mkl:
buildable: false
externals:
- spec: intel-oneapi-mkl@2024.2.0%oneapi@2024.2.0
- spec: intel-oneapi-mkl@2024.2.0
prefix: /usr/local/intel/oneapi/2024
gcc:
externals:
Expand Down
Loading
Loading