Skip to content

Commit eddfe1c

Browse files
committed
add docs for the uenv: field in environments.yaml
1 parent 1f47c3e commit eddfe1c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/recipes.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,22 @@ will configure two views:
313313
* `default`: a view of all the software in the environment using the default settings of Spack.
314314
* `no-python`: everything in the default view, except any versions of `python`.
315315

316+
Stackinator provides some additional options that are not provided by Spack, to fine tune the view, that can be set in the `uenv:` field:
317+
318+
```yaml
319+
cuda-env:
320+
views:
321+
uenv:
322+
add_compilers: true
323+
prefix_paths:
324+
LD_LIBRARY_PATH: [lib, lib64]
325+
```
326+
327+
* `add_compilers` (default `true`): by default Spack will not add compilers to the `PATH` variable. Stackinator automatically adds the `gcc` and/or `nvhpc` to path. This option can be used to explicitly disable or enable this feature.
328+
* `prefix_paths` (default empty): this option can be used to customise prefix style environment variables (`PATH`, `LD_LIBRARY_PATH`, `PKG_CONFIG_PATH`, `PYTHONPATH`, etc).
329+
* the key is the environment variable, and the value is a list of paths to search for in the environment view. All paths that match an entry in the list will be prepended to the prefix path environment variable.
330+
* the main use for this feature is to opt-in to setting `LD_LIBRARY_PATH`. By default Spack does not add `lib` and `lib64` to `LD_LIBRARY_PATH` because that can break system installed applications that depend on `LD_LIBRARY_PATH` or finding their dependencies in standard locations like `/usr/lib`.
331+
316332
See the [interfaces documentation](interfaces.md#environment-views) for more information about how the environment views are provided to users of a stack.
317333

318334
## Modules

0 commit comments

Comments
 (0)