-
Notifications
You must be signed in to change notification settings - Fork 3
Add remaining <compiler>-<backend>-env recipes currently used #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b208d2e
Add recipes for all final env images
bartgol 7e7dbe4
Fix SSL issues directly in base image
bartgol 28abac1
Install vi in base image
bartgol 2f4375e
Try to do away with cuda repo
bartgol b4f2cfb
claudio's manual review above
mahf708 35f2e27
Fix gnu-cuda-env: use CUDA_HOME instead of undefined CUDA_ROOT
Copilot ed1b1f9
Add missing trailing separator to final-env tag prefix
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| ARG BASE_TAG=UNSET | ||
| ARG NVIDIA_DRIVER_VERSION=535 | ||
| ARG BASE_IMAGE=ghcr.io/e3sm-project/e3sm-ghci-snl | ||
| FROM ${BASE_IMAGE}:${BASE_TAG} | ||
|
|
||
| # Install packages in chunks, so we can tweak versions of some pkg without | ||
| # rebuilding the whole image. Hence, put "stable" pkgs first to minimize rebuild time | ||
| # NOTE: the env vars COMPILER, COMPILER_VERSION, and SPACK_ARCH are defined in the base image | ||
|
|
||
| # Common utilities | ||
| RUN source /spack/share/spack/setup-env.sh && \ | ||
| spack install yaml-cpp cmake %${COMPILER}@${COMPILER_VERSION} arch=${SPACK_ARCH} | ||
|
|
||
| # Common scientific libs (non-MPI dependent) | ||
| RUN source /spack/share/spack/setup-env.sh && \ | ||
| spack install boost netlib-lapack %${COMPILER}@${COMPILER_VERSION} arch=${SPACK_ARCH} | ||
|
|
||
| # CUDA | ||
| RUN source /spack/share/spack/setup-env.sh && \ | ||
| spack install cuda@12.4.0 %${COMPILER}@${COMPILER_VERSION} arch=${SPACK_ARCH} | ||
|
|
||
| # MPI | ||
| RUN source /spack/share/spack/setup-env.sh && \ | ||
| spack install mpich@4.1.1 %${COMPILER}@${COMPILER_VERSION} arch=${SPACK_ARCH} | ||
|
|
||
| # Netcdf libraries | ||
| RUN source /spack/share/spack/setup-env.sh && \ | ||
| spack install netcdf-c+mpi netcdf-fortran parallel-netcdf %${COMPILER}@${COMPILER_VERSION} arch=${SPACK_ARCH} | ||
|
|
||
| # Make sure the modules for the installed packages are all available | ||
| RUN source /spack/share/spack/setup-env.sh && \ | ||
| spack module lmod refresh -y --delete-tree | ||
|
|
||
| # Generate the profile.d script to load them all at bash startup | ||
| RUN echo "module load yaml-cpp cmake" >> /etc/profile.d/eamxx-env.sh | ||
| RUN echo "module load boost netlib-lapack" >> /etc/profile.d/eamxx-env.sh | ||
| RUN echo "module load cuda" >> /etc/profile.d/eamxx-env.sh | ||
| RUN echo "module load mpich" >> /etc/profile.d/eamxx-env.sh | ||
| RUN echo "module load netcdf-c netcdf-fortran parallel-netcdf" >> /etc/profile.d/eamxx-env.sh | ||
|
|
||
| # Install numpy/cupy | ||
| RUN source /etc/profile.d/modules.sh && \ | ||
| source /etc/profile.d/eamxx-env.sh && \ | ||
|
mahf708 marked this conversation as resolved.
|
||
| LIBRARY_PATH="$CUDA_HOME/lib64/stubs:$LIBRARY_PATH" \ | ||
| python3 -m pip install numpy cupy | ||
|
|
||
| # Install pytorch | ||
| RUN source /etc/profile.d/modules.sh && \ | ||
| source /etc/profile.d/eamxx-env.sh && \ | ||
| python3 -m pip install \ | ||
| --extra-index-url https://download.pytorch.org/whl/cu124 \ | ||
| torch==2.6.0+cu124 | ||
|
|
||
| # Whomever will run the container will be able to pip install pkgs in the venv | ||
| # After all, the container is ephemeral/disposable, so there's no persistent state | ||
| RUN chmod -R a+rwX /projects/e3sm/software/eamxx-venv | ||
|
|
||
| # Clean up garbage packages that were only needed to BUILD other pkgs (not to USE them) | ||
| RUN source /spack/share/spack/setup-env.sh && spack gc -y | ||
|
|
||
| # Remove spack repo (except .git, so you can restore it) and spack buildcache (to keep image size under control) | ||
| RUN rm -rf /spack-buildcache && \ | ||
| rm -rf /spack/* | ||
|
|
||
| # CIME tests need a bunch of perl | ||
| RUN microdnf install -y perl | ||
|
|
||
| ENTRYPOINT [] | ||
| CMD [ "/bin/bash", "--login" ] | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| ARG BASE_TAG=UNSET | ||
| ARG BASE_IMAGE=ghcr.io/e3sm-project/e3sm-ghci-snl | ||
| FROM ${BASE_IMAGE}:${BASE_TAG} | ||
|
|
||
| # Install packages in chunks, so we can tweak versions of some pkg without | ||
| # rebuilding the whole image. Hence, put "stable" pkgs first to minimize rebuild time | ||
| # NOTE: the env vars COMPILER, COMPILER_VERSION, and SPACK_ARCH are defined in the base image | ||
|
|
||
| # Common utilities | ||
| RUN source /spack/share/spack/setup-env.sh && \ | ||
| spack install yaml-cpp cmake %${COMPILER}@${COMPILER_VERSION} arch=${SPACK_ARCH} | ||
|
|
||
| # Common scientific libs (non-MPI dependent) | ||
| RUN source /spack/share/spack/setup-env.sh && \ | ||
| spack install boost intel-oneapi-mkl %${COMPILER}@${COMPILER_VERSION} arch=${SPACK_ARCH} | ||
|
|
||
| # MPI and Netcdf libraries | ||
| RUN source /spack/share/spack/setup-env.sh && \ | ||
| spack install openmpi@4.1.4 netcdf-c+mpi netcdf-fortran parallel-netcdf %${COMPILER}@${COMPILER_VERSION} arch=${SPACK_ARCH} | ||
|
|
||
| # Debugging libs | ||
| RUN source /spack/share/spack/setup-env.sh && \ | ||
| spack install valgrind@3.20~mpi %${COMPILER}@${COMPILER_VERSION} arch=${SPACK_ARCH} | ||
|
|
||
| # Make sure the modules for the installed packages are all available | ||
| RUN source /spack/share/spack/setup-env.sh && \ | ||
| spack module lmod refresh -y --delete-tree | ||
|
|
||
| # Generate the profile.d script to load them all at bash startup | ||
| RUN echo "module load yaml-cpp cmake" >> /etc/profile.d/eamxx-env.sh | ||
| RUN echo "module load boost intel-oneapi-mkl" >> /etc/profile.d/eamxx-env.sh | ||
| RUN echo "module load openmpi" >> /etc/profile.d/eamxx-env.sh | ||
| RUN echo "module load netcdf-c netcdf-fortran parallel-netcdf" >> /etc/profile.d/eamxx-env.sh | ||
| RUN echo "module load valgrind" >> /etc/profile.d/eamxx-env.sh | ||
|
|
||
| # Install pytorch | ||
| RUN source /etc/profile.d/modules.sh && \ | ||
| source /etc/profile.d/eamxx-env.sh && \ | ||
| python3 -m pip install \ | ||
| --extra-index-url https://download.pytorch.org/whl/cpu \ | ||
| torch numpy | ||
|
|
||
| # Whomever will run the container will be able to pip install pkgs in the venv | ||
| # After all, the container is ephemeral/disposable, so there's no persistent state | ||
| RUN chmod -R a+rwX /projects/e3sm/software/eamxx-venv | ||
|
|
||
| # Clean up garbage packages that were only needed to BUILD other pkgs (not to USE them) | ||
| RUN source /spack/share/spack/setup-env.sh && spack gc -y | ||
|
|
||
| # Remove spack repo (except .git, so you can restore it) and spack buildcache (to keep image size under control) | ||
| RUN rm -rf /spack-buildcache && \ | ||
| rm -rf /spack/* | ||
|
|
||
| # CIME tests need a bunch of perl | ||
| RUN microdnf install -y perl | ||
|
|
||
| ENTRYPOINT [] | ||
| CMD [ "/bin/bash", "--login" ] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.