From e10c86930ca64b6acbff4f9248a9e5aa03cde8d03aeec812f00e1020d0d21c81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Thu, 8 Aug 2024 16:59:18 +0000 Subject: [PATCH] [info=c054509b33341b6f084b03d94991a6a5] OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/spack-image?expand=0&rev=65 --- .gitattributes | 23 +++++++++++ .gitignore | 1 + Dockerfile | 68 ++++++++++++++++++++++++++++++++ README.md | 78 +++++++++++++++++++++++++++++++++++++ _constraints | 7 ++++ _service | 4 ++ spack-image.changes | 94 +++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 275 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 _constraints create mode 100644 _service create mode 100644 spack-image.changes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..504f331 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: MIT + +# Copyright (c) 2024 SUSE LLC + +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. + +# The content of THIS FILE IS AUTOGENERATED and should not be manually modified. +# It is maintained by the BCI team and generated by +# https://github.com/SUSE/BCI-dockerfile-generator + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# You can contact the BCI team via https://github.com/SUSE/bci/discussions + +#!ExclusiveArch: aarch64 x86_64 +#!BuildTag: opensuse/bci/spack:0.22 +#!BuildTag: opensuse/bci/spack:0.22-%RELEASE% +#!BuildTag: opensuse/bci/spack:0.22.1 +#!BuildTag: opensuse/bci/spack:0.22.1-%RELEASE% +#!BuildTag: opensuse/bci/spack:latest + +FROM opensuse/tumbleweed:latest + +# Define labels according to https://en.opensuse.org/Building_derived_containers +# labelprefix=org.opensuse.bci.spack +LABEL org.opencontainers.image.authors="openSUSE (https://www.opensuse.org/)" +LABEL org.opencontainers.image.title="openSUSE Tumbleweed BCI Spack development" +LABEL org.opencontainers.image.description="Spack development container for building containerized HPC solution stacks, based on the openSUSE Tumbleweed Base Container Image." +LABEL org.opencontainers.image.version="0.22" +LABEL org.opencontainers.image.url="https://www.opensuse.org" +LABEL org.opencontainers.image.created="%BUILDTIME%" +LABEL org.opencontainers.image.vendor="openSUSE Project" +LABEL org.opencontainers.image.source="%SOURCEURL%" +LABEL org.opensuse.reference="registry.opensuse.org/opensuse/bci/spack:0.22-%RELEASE%" +LABEL org.openbuildservice.disturl="%DISTURL%" +LABEL org.opensuse.lifecycle-url="https://en.opensuse.org/Lifetime#openSUSE_BCI" +LABEL org.opensuse.release-stage="released" +# endlabelprefix +LABEL io.artifacthub.package.readme-url="https://raw.githubusercontent.com/SUSE/BCI-dockerfile-generator/Tumbleweed/spack-image/README.md" +LABEL io.artifacthub.package.logo-url="https://spack.io/assets/images/spack-logo-white.svg" +LABEL usage="This container is enabled and supported only on a SLE15+ host." + +RUN set -euo pipefail; zypper -n in spack bison cmake-full flex libtool makeinfo patchelf lsb-release zstd libzip-devel libcurl-devel libopenssl-devel ncurses-devel tack xz-devel; zypper -n clean; rm -rf /var/log/{lastlog,tallylog,zypper.log,zypp/history,YaST2} +ENV SPACK_ROOT="/usr" +ENV CURRENTLY_BUILDING_DOCKER_IMAGE="1" +ENV container="docker" + +ENTRYPOINT ["/bin/bash", "/usr/share/spack/docker/entrypoint.bash"] +CMD ["interactive-shell"] + +RUN set -euo pipefail; ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/docker-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/interactive-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/spack-env \ + && echo 'source $SPACK_ROOT/share/spack/spack-completion.bash' > /root/.bashrc +RUN set -euo pipefail; mkdir -p /root/.spack \ + && cp $SPACK_ROOT/share/spack/docker/modules.yaml \ + /root/.spack/modules.yaml \ + && rm -rf /root/*.* /run/nologin + +# sanity check that the version from the tag is equal to the version of spack that we expect +RUN set -euo pipefail; [ "$(rpm -q --qf '%{version}' spack | cut -d '.' -f -3)" = "0.22.1" ] + +WORKDIR /root +SHELL ["docker-shell"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..5d92577 --- /dev/null +++ b/README.md @@ -0,0 +1,78 @@ +# Spack 0.22 container image +![Redistributable](https://img.shields.io/badge/Redistributable-Yes-green) + +## Description +Spack is a package manager for supercomputers. It provides build recipes +for more than 6000 software components, and it allows to build entire +HPC application stacks with little to no prerequisites. + +This container image serves as a build environment for a `Dockerfile` +or an `apptainter.def` file created by `spack containerize`. It can be +used to run spack commands directly as well. Doing this may require to +bind-mount local directories into the container. + +## Usage +This image may be used to build and containerize application stacks using +Spack. The stack is installed in a base container such as SLE BCI Base. +To build a containerized application stack, create the file `spack.yaml` +in an empty directory with the following content: +```yaml +spack: + specs: + - + + container: + format: + images: + build: "registry.opensuse.org/opensuse/bci/spack:0.22" + final: "registry.suse.com/bci/bci-base:latest" + os_packages: + command: zypper + build: + - + final: + - +``` +Replace 'application spec' with the actual application name, and provide optional +build specifications (for details see the +[Spack documentation](https://spack.readthedocs.io/en/latest/)). +The 'container_format' can be either `docker` for a docker/OCI container +image or `singularity` for a Singularity/Apptainer container image. +The `os_packages` section is optional. Here you may specify additional +packages to install in the build container or in the final +runtime container image. +To build an Apptainer container, run the following commands in the same +directory: +```ShellSession +$ spack containerize > apptainer.def +$ apptainer build apptainer.sif apptainer.def +``` +This builds `apptainer.sif` as the final Singularity/Apptainer image that can then be run as follows: +```ShellSession +$ apptainer exec ./apptainer.sif +``` +To build a docker/OCI container, run the following commands: +```ShellSession +$ spack containerize > Containerfile +$ podman build -t --format=docker . +``` +This builds a Docker container that you can run as follows: +``` +$ podman run -it --rm +``` +If you do not have a local installation of Spack, you can use this container +to run Spack commands - like `spack containerize`: +```ShellSession +$ podman run -v $(pwd):/root:Z --rm registry.opensuse.org/opensuse/bci/spack:0.22 containerize > Containerfile +``` +For further information, refer to the +[Spack documentation on container images](https://spack.readthedocs.io/en/latest/containers.html). +## Licensing + +`SPDX-License-Identifier: MIT` + +This documentation and the build recipe are licensed as MIT. +The container itself contains various software components under various open source licenses listed in the associated +Software Bill of Materials (SBOM). + +This image is based on [openSUSE Tumbleweed](https://get.opensuse.org/tumbleweed/). diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..4988ecd --- /dev/null +++ b/_constraints @@ -0,0 +1,7 @@ + + + + 10 + + + diff --git a/_service b/_service new file mode 100644 index 0000000..1652e46 --- /dev/null +++ b/_service @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/spack-image.changes b/spack-image.changes new file mode 100644 index 0000000..d75d7e8 --- /dev/null +++ b/spack-image.changes @@ -0,0 +1,94 @@ +------------------------------------------------------------------- +Thu Aug 8 16:43:43 UTC 2024 - Dirk Mueller + +- remove oci reference annotation again + +------------------------------------------------------------------- +Mon Aug 5 11:38:13 UTC 2024 - Dirk Mueller + +- add OCI reference annotation + +------------------------------------------------------------------- +Sat Aug 3 08:56:51 UTC 2024 - Dirk Mueller + +- set OCI.authors attribute instead of deprecated MAINTAINER + +------------------------------------------------------------------- +Wed Jul 31 12:06:44 UTC 2024 - Dirk Mueller + +- set specific lifecycle url for openSUSE BCI + +------------------------------------------------------------------- +Tue Jul 16 08:14:58 UTC 2024 - Dirk Mueller + +- update tags to new versions + +------------------------------------------------------------------- +Wed Jul 10 15:59:28 UTC 2024 - Egbert Eich + +- update description + +------------------------------------------------------------------- +Mon Jul 8 13:38:58 UTC 2024 - Dirk Mueller + +- use minor version level only for spack + +------------------------------------------------------------------- +Mon Jul 1 15:19:46 UTC 2024 - Dirk Mueller + +- Add usage label stating supported hosts + +------------------------------------------------------------------- +Tue Jun 18 17:24:16 UTC 2024 - Dirk Mueller + +- use sentence style capitalization in READMEs + +------------------------------------------------------------------- +Wed Jun 12 07:09:36 UTC 2024 - Dirk Mueller + +- updated to new version + +------------------------------------------------------------------- +Mon Jun 10 15:11:25 UTC 2024 - Dirk Mueller + +- update README; reduce unnecessary newlines + +------------------------------------------------------------------- +Wed Jun 5 15:13:27 UTC 2024 - Dirk Mueller + +- Don't add artifacthub labels into labelprefix section + +------------------------------------------------------------------- +Wed Jun 5 12:47:22 UTC 2024 - Dan Čermák + +- Hardcode package version in the README + +------------------------------------------------------------------- +Tue Jun 4 12:35:15 UTC 2024 - Alexandre Vicenzi + +- Fix grammar mistake in licensing footer + +------------------------------------------------------------------- +Wed May 8 16:26:31 UTC 2024 - Dirk Mueller + +- README fixes - better titles and follow recommended document structure + +------------------------------------------------------------------- +Wed May 8 12:09:13 UTC 2024 - Dirk Mueller + +- README typo fix + +------------------------------------------------------------------- +Tue May 7 19:07:24 UTC 2024 - Dirk Mueller + +- extend READMEs; correct eula for application images + +------------------------------------------------------------------- +Mon May 6 06:35:54 UTC 2024 - Dirk Mueller + +- Limit building to aarch64 & x86_64 + +------------------------------------------------------------------- +Wed May 01 08:17:45 UTC 2024 - SUSE Update Bot + +- First version of the Spack development BCI