[info=f927982f76aec77ecddc8b4e8c2888d1]
OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/spack-image?expand=0&rev=1
This commit is contained in:
commit
fd24bb6cf2
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -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
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
66
Dockerfile
Normal file
66
Dockerfile
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
# 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
|
||||||
|
|
||||||
|
|
||||||
|
#!BuildTag: opensuse/bci/spack:%%spack_version%%
|
||||||
|
#!BuildTag: opensuse/bci/spack:%%spack_version%%-%RELEASE%
|
||||||
|
#!BuildTag: opensuse/bci/spack:%%spack_minor%%
|
||||||
|
#!BuildTag: opensuse/bci/spack:%%spack_minor%%-%RELEASE%
|
||||||
|
#!BuildTag: opensuse/bci/spack:latest
|
||||||
|
|
||||||
|
FROM opensuse/tumbleweed:latest
|
||||||
|
|
||||||
|
MAINTAINER openSUSE (https://www.opensuse.org/)
|
||||||
|
|
||||||
|
# Define labels according to https://en.opensuse.org/Building_derived_containers
|
||||||
|
# labelprefix=org.opensuse.bci.spack
|
||||||
|
LABEL org.opencontainers.image.title="openSUSE Tumbleweed BCI Spack development"
|
||||||
|
LABEL org.opencontainers.image.description="Spack is a flexible package manager for supercomputers, based on the openSUSE Tumbleweed Base Container Image."
|
||||||
|
LABEL org.opencontainers.image.version="%%spack_version%%"
|
||||||
|
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 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 org.opensuse.reference="registry.opensuse.org/opensuse/bci/spack:%%spack_version%%-%RELEASE%"
|
||||||
|
LABEL org.openbuildservice.disturl="%DISTURL%"
|
||||||
|
LABEL org.opensuse.lifecycle-url="https://en.opensuse.org/Lifetime"
|
||||||
|
LABEL org.opensuse.release-stage="released"
|
||||||
|
|
||||||
|
# endlabelprefix
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
WORKDIR /root
|
||||||
|
SHELL ["docker-shell"]
|
67
README.md
Normal file
67
README.md
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
# Spack %%spack_version%% Container Image
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
## How to use the image
|
||||||
|
|
||||||
|
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:
|
||||||
|
- <application spec>
|
||||||
|
|
||||||
|
container:
|
||||||
|
format: <container_format>
|
||||||
|
images:
|
||||||
|
build: "registry.opensuse.org/opensuse/bci/spack:%%spack_version%%-%RELEASE%"
|
||||||
|
final: "registry.suse.com/bci/bci-base:latest"
|
||||||
|
os_packages:
|
||||||
|
command: zypper
|
||||||
|
build:
|
||||||
|
- <additional packages for building>
|
||||||
|
final:
|
||||||
|
- <additional packages for final container>
|
||||||
|
```
|
||||||
|
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 <command line ...>
|
||||||
|
```
|
||||||
|
To build a docker/OCI container, run the following commands:
|
||||||
|
```ShellSession
|
||||||
|
$ spack containerize > Containerfile
|
||||||
|
$ podman build -t <target_name> --format=docker .
|
||||||
|
```
|
||||||
|
This builds a Docker container that you can run as follows:
|
||||||
|
```
|
||||||
|
$ podman run -it --rm <target_name> <command line ...>
|
||||||
|
```
|
||||||
|
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:%%spack_version%%-%RELEASE% containerize > Containerfile
|
||||||
|
```
|
||||||
|
For further information, refer to the
|
||||||
|
(Spack documentation on container images)[https://spack.readthedocs.io/en/latest/containers.html].
|
7
_constraints
Normal file
7
_constraints
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<constraints>
|
||||||
|
<hardware>
|
||||||
|
<disk>
|
||||||
|
<size unit="G">10</size>
|
||||||
|
</disk>
|
||||||
|
</hardware>
|
||||||
|
</constraints>
|
22
_service
Normal file
22
_service
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<services>
|
||||||
|
<service mode="buildtime" name="docker_label_helper"/>
|
||||||
|
<service mode="buildtime" name="kiwi_metainfo_helper"/>
|
||||||
|
<service name="replace_using_package_version" mode="buildtime">
|
||||||
|
<param name="file">Dockerfile</param>
|
||||||
|
<param name="regex">%%spack_version%%</param>
|
||||||
|
<param name="package">spack</param>
|
||||||
|
<param name="parse-version">patch</param>
|
||||||
|
</service>
|
||||||
|
<service name="replace_using_package_version" mode="buildtime">
|
||||||
|
<param name="file">Dockerfile</param>
|
||||||
|
<param name="regex">%%spack_minor%%</param>
|
||||||
|
<param name="package">spack</param>
|
||||||
|
<param name="parse-version">minor</param>
|
||||||
|
</service>
|
||||||
|
<service name="replace_using_package_version" mode="buildtime">
|
||||||
|
<param name="file">README.md</param>
|
||||||
|
<param name="regex">%%spack_version%%</param>
|
||||||
|
<param name="package">spack</param>
|
||||||
|
<param name="parse-version">patch</param>
|
||||||
|
</service>
|
||||||
|
</services>
|
4
spack-image.changes
Normal file
4
spack-image.changes
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 01 08:17:45 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
|
||||||
|
|
||||||
|
- First version of the Spack development BCI
|
Loading…
Reference in New Issue
Block a user