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
The file is not part of the [system configuration](cluster-config.md): mirror locations are usually specific to the person running the build, so each invocation provides its own.
11
-
Paths inside the file (such as relative gpg key paths) are resolved relative to the directory containing the `mirrors.yaml`, so a self-contained mirror directory (the `mirrors.yaml` plus its keys) can be moved around freely.
12
12
13
13
A `mirrors.yaml` can describe five kinds of entry, each optional and each documented below:
14
14
@@ -20,23 +20,29 @@ A `mirrors.yaml` can describe five kinds of entry, each optional and each docume
20
20
|[`sourcecache`](#source-cache)| one | writable local cache that fills with sources as you build |
21
21
|[`concretizer`](#concretizer-cache)| one | writable local cache that persists concretization results |
Paths inside the file (such as relative gpg key paths) are resolved relative to the directory containing the `mirrors.yaml`, so a self-contained mirror directory (the `mirrors.yaml` plus its keys) can be moved around freely.
24
45
25
-
```yaml title="mirrors.yaml"
26
-
buildcache:
27
-
url: file:///capstor/scratch/team/uenv-cache
28
-
private_key: $SCRATCH/.keys/spack-push-key.gpg
29
-
mount_specific: true
30
-
bootstrap:
31
-
url: https://bootstrap.spack.io
32
-
sourcemirror:
33
-
mirror1:
34
-
url: https://example.com/spack-sources
35
-
sourcecache:
36
-
path: /capstor/scratch/$USER/spack-sources
37
-
concretizer:
38
-
path: /capstor/scratch/$USER/spack-concretizer
39
-
```
40
46
41
47
To stop using any entry, remove (or comment out) it from `mirrors.yaml`.
42
48
@@ -50,7 +56,7 @@ During a build Spack fetches packages from the cache when it can, and signs and
@@ -177,7 +183,7 @@ Unlike a source mirror it is written to automatically, and is created on demand.
177
183
178
184
```yaml title="mirrors.yaml"
179
185
sourcecache:
180
-
path: /capstor/scratch/$USER/spack-sources
186
+
path: /capstor/scratch/bobsmith/spack-sources
181
187
```
182
188
183
189
| Field | Required | Description |
@@ -191,7 +197,7 @@ Concretization can be a large fraction of build time, so pointing this at a pers
191
197
192
198
```yaml title="mirrors.yaml"
193
199
concretizer:
194
-
path: /capstor/scratch/$USER/spack-concretizer
200
+
path: /capstor/scratch/bobsmith/spack-concretizer
195
201
```
196
202
197
203
| Field | Required | Description |
@@ -201,14 +207,17 @@ concretizer:
201
207
This emits a `concretizer.yaml` that sets `concretizer:concretization_cache:{enable: true, url}`.
202
208
The cache is keyed by the hash of the solver inputs, so it can be reused safely across builds — stale entries simply miss.
203
209
204
-
!!! warning "It does not eliminate concretization time"
205
-
The cache stores only the *result of the solve* for a given set of inputs. Before it can be consulted, Spack still has to rebuild the full concretization problem on every run — loading the package recipes and enumerating the reusable packages — and that setup work is often the larger part of concretization. So a cache hit skips the solver but not the setup: concretization gets faster, not free.
210
+
!!! info "concretizer cache is not a silver bullet"
211
+
The cache stores only the *result of the solve* for a given set of inputs.
212
+
Before it can be consulted, Spack still has to rebuild the full concretization problem on every run, loading the package recipes and enumerating the reusable packages, and that setup work is often the larger part of concretization.
213
+
So a cache hit skips the solver but not the setup: concretization gets faster, not free.
206
214
207
-
The win is therefore largest for repeated builds of the same stack against a stable build cache (the previous solve is replayed), and smallest when the bulk of concretization time is in setup. The cache never makes concretization slower.
215
+
The win is therefore largest for repeated builds of the same stack against a stable build cache (the previous solve is replayed), and smallest when the bulk of concretization time is in setup.
208
216
209
217
!!! note "Requires Spack ≥ 1.1"
210
218
The `concretizer:concretization_cache` config key was introduced in Spack 1.1, and Spack 1.0 rejects it.
211
-
Stackinator infers the Spack version from the `spack.commit` in `config.yaml` (defaulting to a supported version when the commit is a branch or arbitrary SHA that cannot be pinned). When it detects Spack 1.0 it skips the concretizer cache with a warning rather than producing a config that would fail the build.
219
+
Stackinator infers the Spack version from the `spack.commit` in `config.yaml` (defaulting to a supported version when the commit is a branch or arbitrary SHA that cannot be pinned).
220
+
When it detects Spack 1.0 it skips the concretizer cache with a warning rather than producing a config that would fail the build.
See the [Spack documentation](https://spack.readthedocs.io/en/latest/getting_started.html#gpg-signing) for more on GPG keys.
237
246
238
-
!!! failure "Don't use `$HOME`"
247
+
!!! warning "Don't use `$HOME`"
239
248
The build remounts `~` as a tmpfs, so keys under `$HOME` are not visible during the build and Spack will fail to read them. Use scratch storage instead.
0 commit comments