Skip to content

Commit d96c633

Browse files
committed
Update edf.md
1 parent eb8ac61 commit d96c633

File tree

1 file changed

+27
-32
lines changed
  • docs/software/container-engine

1 file changed

+27
-32
lines changed

docs/software/container-engine/edf.md

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@ In the following, the default value is none (i.e., the empty value of the corres
1111

1212
Ordered list of EDFs that this file inherits from. Parameters from listed environments are evaluated sequentially. Supports up to 10 levels of recursion.
1313

14-
??? note
15-
* Parameters from the listed environments are evaluated sequentially, adding new entries or overwriting previous ones, before evaluating the parameters from the current EDF. In other words, the current EDF inherits the parameters from the EDFs listed in `base_environment`. When evaluating `mounts` or `env` parameters, values from downstream EDFs are appended to inherited values.
16-
* The individual EDF entries in the array follow the same search rules as the arguments of the `--environment` CLI option for Slurm; they can be either file paths or filenames without extension if the file is located in the [EDF search path][ref-ce-edf-search-path].
17-
* This parameter can be a string if there is only one base environment.
18-
19-
??? example
14+
!!! example
2015
* Single environment inheritance:
2116
```bash
2217
base_environment = "common_env"
@@ -27,18 +22,16 @@ Ordered list of EDFs that this file inherits from. Parameters from listed enviro
2722
base_environment = ["common_env", "ml_pytorch_env1"]
2823
```
2924

25+
??? note
26+
* Parameters from the listed environments are evaluated sequentially, adding new entries or overwriting previous ones, before evaluating the parameters from the current EDF. In other words, the current EDF inherits the parameters from the EDFs listed in `base_environment`. When evaluating `mounts` or `env` parameters, values from downstream EDFs are appended to inherited values.
27+
* The individual EDF entries in the array follow the same search rules as the arguments of the `--environment` CLI option for Slurm; they can be either file paths or filenames without extension if the file is located in the [EDF search path][ref-ce-edf-search-path].
28+
* This parameter can be a string if there is only one base environment.
29+
3030
### (STRING) image
3131

3232
The container image to use. Can reference a remote Docker/OCI registry or a local Squashfs file as a filesystem path.
3333

34-
??? note
35-
* The full format for remote references is `[USER@][REGISTRY#]IMAGE[:TAG]`.
36-
* `[REGISTRY#]`: (optional) registry URL, followed by #. Default: Docker Hub.
37-
* `IMAGE`: image name.
38-
* `[:TAG]`: (optional) image tag name, preceded by :.
39-
* The registry user can also be specified in the `$HOME/.config/enroot/.credentials` file.
40-
41-
??? example
34+
!!! example
4235
* Reference of Ubuntu image in the Docker Hub registry (default registry)
4336
```bash
4437
image = "library/ubuntu:24.04"
@@ -64,11 +57,18 @@ The container image to use. Can reference a remote Docker/OCI registry or a loca
6457
image = "/path/to/image.squashfs"
6558
```
6659

60+
??? note
61+
* The full format for remote references is `[USER@][REGISTRY#]IMAGE[:TAG]`.
62+
* `[REGISTRY#]`: (optional) registry URL, followed by #. Default: Docker Hub.
63+
* `IMAGE`: image name.
64+
* `[:TAG]`: (optional) image tag name, preceded by :.
65+
* The registry user can also be specified in the `$HOME/.config/enroot/.credentials` file.
66+
6767
### (STRING) workdir
6868

6969
Initial working directory when the container starts. Default: inherited from image.
7070

71-
??? example
71+
!!! example
7272
* Workdir pointing to a user defined project path 
7373
```bash
7474
workdir = "/home/user/projects"
@@ -82,7 +82,7 @@ Initial working directory when the container starts. Default: inherited from ima
8282

8383
If true, run the entrypoint from the container image. Default: true.
8484

85-
??? example
85+
!!! example
8686
```bash
8787
entrypoint = false
8888
```
@@ -91,7 +91,7 @@ If true, run the entrypoint from the container image. Default: true.
9191

9292
If false, the container filesystem is read-only. Default: true.
9393

94-
??? example
94+
!!! example
9595
```bash
9696
writable = true
9797
```
@@ -100,12 +100,7 @@ If false, the container filesystem is read-only. Default: true.
100100

101101
List of bind mounts in the format `SOURCE:DESTINATION[:FLAGS]`. Flags are optional and can include `ro`, `private`, etc.
102102

103-
??? note
104-
* Mount flags are separated with a plus symbol, for example: `ro+private`.
105-
* Optional flags from docker format or OCI (need reference)
106-
107-
??? example
108-
103+
!!! example
109104
* Literal fixed mount map
110105
```bash
111106
mounts = ["/capstor/scratch/cscs/amadonna:/capstor/scratch/cscs/amadonna"]
@@ -121,19 +116,15 @@ List of bind mounts in the format `SOURCE:DESTINATION[:FLAGS]`. Flags are option
121116
mounts = ["${SCRATCH}:/scratch"]
122117
```
123118

119+
??? note
120+
* Mount flags are separated with a plus symbol, for example: `ro+private`.
121+
* Optional flags from docker format or OCI (need reference)
124122

125123
### (TABLE) env
126124

127125
Environment variables to set in the container. Null-string values will unset the variable. Default: inherited from the host and the image.
128126

129-
??? note
130-
* By default, containers inherit environment variables from the container image and the host environment, with variables from the image taking precedence.
131-
* The env table can be used to further customize the container environment by setting, modifying, or unsetting variables.
132-
* Values of the table entries must be strings. If an entry has a null value, the variable corresponding to the entry key is unset in the container.
133-
134-
135-
??? example
136-
127+
!!! example
137128
* Basic `env` block
138129
```bash
139130
[env]
@@ -149,12 +140,16 @@ Environment variables to set in the container. Null-string values will unset the
149140
DEBUG = "true"
150141
```
151142

143+
??? note
144+
* By default, containers inherit environment variables from the container image and the host environment, with variables from the image taking precedence.
145+
* The env table can be used to further customize the container environment by setting, modifying, or unsetting variables.
146+
* Values of the table entries must be strings. If an entry has a null value, the variable corresponding to the entry key is unset in the container.
152147

153148
### (TABLE) annotations
154149

155150
OCI-like annotations for the container. For more details, refer to the [Annotations][ref-ce-annotations] section.
156151

157-
??? example
152+
!!! example
158153

159154
* Disabling the CXI hook
160155
```bash

0 commit comments

Comments
 (0)