You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extends config.yaml to accept not only
```yaml
...
packages:
repo: https://github.com/foo/spack-packages.git
commit: abcdef
```
but also multiple repos:
```yaml
...
packages:
myrepo:
repo: https://github.com/bar/other-packages.git
commit: fedcba
path: path/to/repo
builtin:
repo: https://github.com/foo/spack-packages.git
commit: abcdef
```
Order of repos is significant in the same way it's significant in spack
config files
(https://spack.readthedocs.io/en/latest/repositories.html#search-order-and-overriding-packages).
Packages from repos higher up on the list take precedence.
I made a small change so that there are also two implicit repos
(currently on main there's one: `alps`). A repo `recipe` exists if and
only if there are packages in the recipe. `alps` still exists, but
doesn't have the recipe packages. The example above would produce the
following list of repos:
- `recipe`
- `alps`
- `myrepo`
- `builtin`
Currently there's no enforcement that the repo entry has the same name
as the repo namespace (similar to spack itself, if I understand it
correctly). Is this ok?
There's an optional `path` property that can be used to point to a
non-default subdirectory within the cloned git repo. For spack-packages
this is always in `repos/spack_repo/builtin`, so the default is
`repos/spack_repo/{name}`. In spack-packages there is an index file
https://github.com/spack/spack-packages/blob/develop/spack-repo-index.yaml
which _could_ be used to locate all the package repos within a git repo.
Spack uses this when it clones package repos through git. For now I
decided it's overkill to support that. Thoughts?
Copy file name to clipboardExpand all lines: docs/cluster-config.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,8 +129,8 @@ If custom package definitions are provided for the same package in more than one
129
129
130
130
The following precedence is applied, where 1 has higher precedence than 2 or 3:
131
131
132
-
1. packages defined in the (optional) `repo` path in the [recipe](recipes.md#custom-spack-packages)
133
-
2. packages defined in the (optional) site repo(s) defined in the `repo/repos.yaml` file of cluster configuration (documented here)
134
-
3. packages provided by Spack (in the `var/spack/repos/builtin` path)
132
+
1. packages defined in the (optional) `repo` path in the [recipe][custom-spack-packages]
133
+
2. packages defined in the (optional) site repo(s) defined in the `repo/repos.yaml` file of the cluster configuration (documented here)
134
+
3. packages defined in the package repositories configured in `config.yaml:spack:packages`, in the order specified (which typically includes `builtin`)
135
135
136
-
As of Stackinator v4, the definitions of some custom repositories (mainly CSCS' custom cray-mpich and its dependencies) was removed from Stackinator, and moved to the the site configuration
136
+
As of Stackinator v4, the definitions of some custom repositories (mainly CSCS' custom cray-mpich and its dependencies) was removed from Stackinator, and moved to the site configuration.
It's possible to configure multiple package repositories for the uenv build by providing a dictionary of spack repositories. For example:
44
+
45
+
```yaml title="config.yaml"
46
+
name: prgenv-gnu
47
+
store: /user-environment
48
+
spack:
49
+
repo: https://github.com/spack/spack.git
50
+
commit: releases/v1.0
51
+
packages:
52
+
builtin:
53
+
repo: https://github.com/spack/spack-packages.git
54
+
commit: develop
55
+
foo:
56
+
repo: https://github.com/foo/spack-packages.git
57
+
commit: v13.2
58
+
path: repos/spack_repo/foo
59
+
version: 2
60
+
```
61
+
62
+
The `path` entry is optional and defaults to `repos/spack_repo/${name}`, where the dictionary key is the `name`.
63
+
For the upstream spack-packages repository, the default value can be used.
64
+
65
+
!!! info
66
+
The order of package repositories is significant.
67
+
stackinator follows the same semantics as spack itself, where package repositories further up in the list take precedence over ones later in the list.
68
+
Refer to the [spack documentation](https://spack.readthedocs.io/en/latest/repositories.html#search-order-and-overriding-packages) for more information.
69
+
70
+
!!! info
71
+
`recipe`and `alps` are reserved repository names for internal stackinator use and can't be used for user-specified package repositories.
72
+
The `recipe` and `alps` repositories have higher precedence than repositories configured in `config.yaml` (see [custom spack packages][ref-custom-spack-packages] for more details).
73
+
43
74
!!! note "uenv recipe versions"
44
75
Stackinator 6 introduces breaking changes to the uenv recipe format, introduced to support Spack v1.0.
45
76
@@ -487,9 +518,10 @@ Modules are generated for the installed compilers and packages by spack.
487
518
- `modules:default:arch_folder`defaults to `false`. If set to `true` an error is raised, as Stackinator does not support this feature;
488
519
- `modules:default:roots:tcl`is ignored, as Stackinator automatically configures the module root to be inside the uenv mount point.
489
520
521
+
[](){#ref-custom-spack-packages}
490
522
## Custom Spack Packages
491
523
492
-
An optional package repository can be added to a recipe to provide new or customized Spack packages in addition to Spack's `builtin` package repository, if a `repo` path is provided in the recipe.
524
+
An optional package repository can be added to a recipe to provide new or customized Spack packages in addition to the package repositories configured in `config.yaml`, if a `repo` path is provided in the recipe.
493
525
494
526
For example, the following `repo` path will add custom package definitions for the `hdf5` and `nvhpc` packages:
495
527
@@ -502,6 +534,8 @@ repo
502
534
└─ package.py
503
535
```
504
536
537
+
Packages provided together with a recipe will be installed in a separate `recipe` namespace.
538
+
505
539
Additional custom packages can be provided as part of the cluster configuration, as well as additional site packages.
506
540
These packages are all optional, and will be installed together in a single Spack package repository that is made available to downstream users of the generated uenv stack.
507
541
See the documentation for [cluster configuration](cluster-config.md) for more detail.
@@ -523,12 +557,13 @@ See the documentation for [cluster configuration](cluster-config.md) for more de
523
557
In the above case, the package `fmt` is backported from `origin/develop` into the `stackinator-recipe`.
524
558
525
559
!!! alps
526
-
All packages are installed under a single spack package repository called `alps`.
560
+
All cluster configuration packages are installed under a single spack package repository called `alps`.
527
561
The CSCS configurations in [github.com/eth-cscs/alps-cluster-config](https://github.com/eth-cscs/alps-cluster-config) provides a site configuration that defines cray-mpich, its dependencies, and the most up to date versions of cuda, nvhpc etc to all clusters on Alps.
562
+
These site packages are installed under the `alps` Spack package repository namespace.
528
563
529
564
!!! warning
530
565
Unlike Spack package repositories, any `repos.yaml` file in the `repo` path will be ignored.
531
-
This is because the provided packages are added to the `alps` namespace.
566
+
This is because the provided packages are installed in the `recipe` namespace.
0 commit comments