-
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.
modified: .github/workflows/docker-publish.yml modified: cuda-11/Dockerfile modified: cuda-11/spack.yaml modified: ubuntu-clang/Dockerfile modified: ubuntu-clang/spack.yaml modified: ubuntu-gcc/Dockerfile modified: ubuntu-gcc/spack.yaml
- Loading branch information
1 parent
fcdf07b
commit 6690da6
Showing
7 changed files
with
158 additions
and
116 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 |
---|---|---|
|
@@ -39,6 +39,11 @@ jobs: | |
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cancel Previous runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
# Install the cosign tool except on PR | ||
# https://github.com/sigstore/cosign-installer | ||
- name: Install cosign | ||
|
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
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 |
---|---|---|
|
@@ -19,56 +19,56 @@ RUN apt-get -yqq install clang-15 libc++-15-dev libc++abi-15-dev libomp-15-dev | |
# What we want to install and how we want to install it | ||
# is specified in a manifest file (spack.yaml) | ||
RUN mkdir /opt/spack-environment \ | ||
&& (echo "spack:" \ | ||
&& echo " compilers:" \ | ||
&& echo " - compiler:" \ | ||
&& echo " spec: [email protected]" \ | ||
&& echo " paths:" \ | ||
&& echo " cc: /usr/bin/clang-15" \ | ||
&& echo " cxx: /usr/bin/clang++-15" \ | ||
&& echo " f77:" \ | ||
&& echo " fc:" \ | ||
&& echo " flags:" \ | ||
&& echo " cxxflags: -stdlib=libc++" \ | ||
&& echo " operating_system: ubuntu22.04" \ | ||
&& echo " target: x86_64" \ | ||
&& echo " modules: []" \ | ||
&& echo " environment: {}" \ | ||
&& echo " extra_rpaths:" \ | ||
&& echo " - /lib/gcc/x86_64-linux-gnu/11/libgfortran.so" \ | ||
&& echo " packages:" \ | ||
&& echo " all:" \ | ||
&& echo " target:" \ | ||
&& echo " - x86_64_v2" \ | ||
&& echo " compiler:" \ | ||
&& echo " - clang" \ | ||
&& echo " providers:" \ | ||
&& echo " mpi:" \ | ||
&& echo " - mpich" \ | ||
&& echo " blas:" \ | ||
&& echo " - openblas" \ | ||
&& echo " lapack:" \ | ||
&& echo " - openblas" \ | ||
&& echo " specs:" \ | ||
&& echo " - mpich~fortran device=ch4 netmod=ofi" \ | ||
&& echo " - openblas@develop~fortran" \ | ||
&& echo " - petsc@main~fortran+debug" \ | ||
&& echo " - hdf5@1.12.2+hl+mpi~fortran" \ | ||
&& echo " - fftw+mpi+openmp" \ | ||
&& echo " - cmake" \ | ||
&& echo " - gsl" \ | ||
&& echo " - python+pythoncmd" \ | ||
&& echo " - py-pyparsing" \ | ||
&& echo " - py-numpy" \ | ||
&& echo " - py-mpi4py" \ | ||
&& echo " - py-h5py+mpi" \ | ||
&& echo " - py-pytest" \ | ||
&& echo " - ninja" \ | ||
&& echo " concretizer:" \ | ||
&& echo " unify: true" \ | ||
&& echo " view: /opt/view" \ | ||
&& echo " config:" \ | ||
&& echo " install_tree: /opt/software") > /opt/spack-environment/spack.yaml | ||
&& (echo spack: \ | ||
&& echo ' compilers:' \ | ||
&& echo ' - compiler:' \ | ||
&& echo ' spec: [email protected]' \ | ||
&& echo ' paths:' \ | ||
&& echo ' cc: /usr/bin/clang-15' \ | ||
&& echo ' cxx: /usr/bin/clang++-15' \ | ||
&& echo ' f77: null' \ | ||
&& echo ' fc: null' \ | ||
&& echo ' flags:' \ | ||
&& echo ' cxxflags: -stdlib=libc++' \ | ||
&& echo ' operating_system: ubuntu22.04' \ | ||
&& echo ' modules: []' \ | ||
&& echo ' environment: {}' \ | ||
&& echo ' extra_rpaths: []' \ | ||
&& echo ' packages:' \ | ||
&& echo ' all:' \ | ||
&& echo ' target:' \ | ||
&& echo ' - x86_64_v2' \ | ||
&& echo ' compiler:' \ | ||
&& echo ' - clang' \ | ||
&& echo ' providers:' \ | ||
&& echo ' # Cannot use intel-oneapi-mpi with clang' \ | ||
&& echo ' # for some reason, so use mpich for now.' \ | ||
&& echo ' mpi:' \ | ||
&& echo ' - mpich' \ | ||
&& echo ' blas:' \ | ||
&& echo ' - openblas' \ | ||
&& echo ' lapack:' \ | ||
&& echo ' - openblas' \ | ||
&& echo ' specs:' \ | ||
&& echo ' - mpich~fortran device=ch4 netmod=ofi' \ | ||
&& echo ' - openblas@develop~fortran' \ | ||
&& echo ' - petsc@main~fortran+debug' \ | ||
&& echo ' - hdf5+hl+mpi~fortran' \ | ||
&& echo ' - fftw+mpi+openmp' \ | ||
&& echo ' - cmake' \ | ||
&& echo ' - gsl' \ | ||
&& echo ' - python+pythoncmd' \ | ||
&& echo ' - py-pyparsing' \ | ||
&& echo ' - py-numpy' \ | ||
&& echo ' - py-mpi4py' \ | ||
&& echo ' - py-h5py+mpi' \ | ||
&& echo ' - py-pytest' \ | ||
&& echo ' - ninja' \ | ||
&& echo ' concretizer:' \ | ||
&& echo ' unify: true' \ | ||
&& echo ' view: /opt/views/view' \ | ||
&& echo ' config:' \ | ||
&& echo ' install_tree: /opt/software') > /opt/spack-environment/spack.yaml | ||
|
||
# Find externals | ||
RUN spack external find tar | ||
|
@@ -80,24 +80,33 @@ RUN spack external find gettext | |
RUN cd /opt/spack-environment && spack env activate . && spack install --fail-fast && spack gc -y | ||
|
||
# Strip all the binaries | ||
RUN find -L /opt/view/* -type f -exec readlink -f '{}' \; | \ | ||
RUN find -L /opt/views/view/* -type f -exec readlink -f '{}' \; | \ | ||
xargs file -i | \ | ||
grep 'charset=binary' | \ | ||
grep 'x-executable\|x-archive\|x-sharedlib' | \ | ||
awk -F: '{print $1}' | xargs strip -s | ||
awk -F: '{print $1}' | xargs strip | ||
|
||
# Modifications to the environment that are necessary to run | ||
RUN cd /opt/spack-environment && \ | ||
spack env activate --sh -d . >> /etc/profile.d/z10_spack_environment.sh | ||
spack env activate --sh -d . > activate.sh | ||
|
||
|
||
# Bare OS image to run the installed executables | ||
FROM ubuntu:22.04 | ||
|
||
COPY --from=builder /opt/spack-environment /opt/spack-environment | ||
COPY --from=builder /opt/software /opt/software | ||
COPY --from=builder /opt/._view /opt/._view | ||
COPY --from=builder /opt/view /opt/view | ||
COPY --from=builder /etc/profile.d/z10_spack_environment.sh /etc/profile.d/z10_spack_environment.sh | ||
|
||
# paths.view is a symlink, so copy the parent to avoid dereferencing and duplicating it | ||
COPY --from=builder /opt/views /opt/views | ||
|
||
RUN { \ | ||
echo '#!/bin/sh' \ | ||
&& echo '.' /opt/spack-environment/activate.sh \ | ||
&& echo 'exec "$@"'; \ | ||
} > /entrypoint.sh \ | ||
&& chmod a+x /entrypoint.sh \ | ||
&& ln -s /opt/views/view /opt/view | ||
|
||
# Noninteractive install! | ||
ENV DEBIAN_FRONTEND=noninteractive \ | ||
|
@@ -116,6 +125,6 @@ RUN apt-get -yqq install clang-15 libc++-15-dev libc++abi-15-dev libomp-15-dev | |
RUN apt-get -yqq update && apt-get -yqq upgrade \ | ||
&& apt-get -yqq install build-essential bash git tar wget \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
ENTRYPOINT ["/bin/bash", "--rcfile", "/etc/profile", "-l", "-c", "$*", "--" ] | ||
ENTRYPOINT [ "/entrypoint.sh" ] | ||
CMD [ "/bin/bash" ] | ||
|
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
Oops, something went wrong.