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
Copy file name to clipboardExpand all lines: docs/recipes.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -405,12 +405,24 @@ The `set` field is a list of environment variables key-value pairs that specify
405
405
* It is not possible to set an initial value that is not `null` for a prefix path variable.
406
406
Set such variables to `null` (unset it), then provide `append_path` and `prefix_path` operations below to set the individual paths.
407
407
408
-
!!! note "using `${@VAR@}` to use environment variables"
408
+
!!! info "use `${@VAR@}` to set environment variables at runtime"
409
409
Sometimes you want to compose an environment variable **that has been set in the runtime environment** in your environment variable definition.
410
410
For example, every user has a different `HOME` or `SCRATCH` value, and you might want to configure your view to store / read configuration from this path.
411
411
The special syntax `${@VAR@}` will defer expanding the environment variable `VAR` until the view is loaded by uenv.
412
412
The example above shows how to set the Juliaup install directory to be in the user's local scratch, i.e. a personalised private location for each user.
413
413
414
+
!!! info "use `$@var@` to configure environment variables at configure time"
415
+
The special syntax `$@var@` can be used to substitute information about the view when configuring the recipe.
416
+
This is useful if you want to set an environment variable that refers to the mount point or mounted location of the view.
417
+
418
+
The following values are available:
419
+
420
+
| key | description |
421
+
| --- | ----------- |
422
+
| `mount` | the mount point of the image, e.g. `/user-environment` |
423
+
| `view_name` | the name of the view, e.g. `cuda-env` in the example above |
424
+
| `view_path` | the prefix path of the view, e.g. `/user-environment/env/cuda-env` |
425
+
414
426
The `prepend_path` field takes a list of key-value pairs that define paths to prepend to a prefix path variable.
0 commit comments