-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed testing env and lockfiles from repo, optimized Dockerfiles
- Loading branch information
Showing
6 changed files
with
28 additions
and
2,133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
keys | ||
__pycache__ | ||
.pytest_cache | ||
.vscode | ||
containers/spack_environment | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,27 @@ | ||
ARG BASE_IMAGE | ||
FROM ${BASE_IMAGE} | ||
|
||
ARG PACKAGE | ||
# Need to specify compiler package name for install and module name for build separately | ||
# e.g. for the latest intel this would be: | ||
# COMPILER_NAME=intel | ||
# COMPILER_PACKAGE=intel-oneapi-compilers | ||
ARG COMPILER_NAME | ||
ARG COMPILER_PACKAGE | ||
ARG COMPILER_VERSION | ||
# eg. mom5, access-om2... | ||
ARG MODEL_NAMES | ||
|
||
ENV SPACK_ENVIRONMENT_DIRECTORY_ROOT=/opt/spack_environment | ||
|
||
# Use Spack shell environment for subsequent RUN steps | ||
SHELL ["docker-shell"] | ||
|
||
COPY ./spack_environment/envs ${SPACK_ENVIRONMENT_DIRECTORY_ROOT} | ||
|
||
RUN ./setup-spack-envs ${MODEL_NAMES} | ||
|
||
# Install required compiler | ||
RUN spack -d install ${COMPILER_PACKAGE}@${COMPILER_VERSION} | ||
# RUN spack -d install ${COMPILER_PACKAGE}@${COMPILER_VERSION} | ||
|
||
# Load required compiler and generate site-wide compilers.yaml | ||
RUN spack load ${COMPILER_PACKAGE}@${COMPILER_VERSION} && \ | ||
spack compiler find --scope site | ||
# RUN spack load ${COMPILER_PACKAGE}@${COMPILER_VERSION} && \ | ||
# spack compiler find --scope site (try with scope env:$package) | ||
|
||
# Build and install package dependencies | ||
RUN spack -d install --only dependencies ${PACKAGE}%${COMPILER_NAME}@${COMPILER_VERSION} | ||
# RUN spack -d install --only dependencies ${PACKAGE}%${COMPILER_NAME}@${COMPILER_VERSION} | ||
|
||
# Push any uncached binaries to buildcache | ||
# `spack find --json | jq .[].name` | ||
# This returns all currently installed spec names | ||
RUN dnf -y install jq | ||
RUN spack -d buildcache create -a -m s3_buildcache `spack find --json | jq --raw-output .[].name` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
for package in "$1"; do | ||
spack env create $package | ||
spack env create $package $package.spack.yaml | ||
spack env activate $package | ||
spack -d install --add ${COMPILER_PACKAGE}@${COMPILER_VERSION} | ||
spack load ${COMPILER_PACKAGE}@${COMPILER_VERSION} | ||
spack compiler find --scope site | ||
spack -d install --only dependencies ${PACKAGE}%${COMPILER_NAME}@${COMPILER_VERSION} | ||
spack -d install --only dependencies --fail-fast | ||
spack gc -y | ||
spack env deactivate | ||
done |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.