22
33Specifying the ` --environment ` option to the Slurm command (e.g., ` srun ` or ` salloc ` ) will make it run inside the EDF environment:
44
5- ``` console title="EDF with an absolute path"
6- $ srun --environment=$SCRATCH /edf/debian.toml cat /etc/os-release
7- PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
8- NAME="Debian GNU/Linux"
9- VERSION_ID="12"
10- ...
11- ```
5+ !!! example "EDF with an absolute path"
6+ ```console
7+ $ srun --environment=$SCRATCH/edf/debian.toml cat /etc/os-release
8+ PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
9+ NAME="Debian GNU/Linux"
10+ VERSION_ID="12"
11+ ...
12+ ```
1213
1314` --environment ` can be a relative path from the current working directory (i.e., where the Slurm command is executed).
1415A relative path should be prepended by ` ./ ` :
1516
16- ``` console title="EDF with a relative path"
17- $ ls
18- debian.toml
17+ !!! example "EDF with a relative path"
18+ ```console
19+ $ ls
20+ debian.toml
1921
20- $ srun --environment=./debian.toml cat /etc/os-release
21- PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
22- NAME="Debian GNU/Linux"
23- VERSION_ID="12"
24- ...
25- ```
22+ $ srun --environment=./debian.toml cat /etc/os-release
23+ PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
24+ NAME="Debian GNU/Linux"
25+ VERSION_ID="12"
26+ ...
27+ ```
2628
2729If an EDF is located in the [ EDF search path] [ ref-ce-edf-search-path ] , ` --environment ` also accepts the EDF filename without the ` .toml ` extension:
2830
29- ``` console title="EDF in the default search path"
30- $ srun --environment=debian cat /etc/os-release
31- PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
32- NAME="Debian GNU/Linux"
33- VERSION_ID="12"
34- ...
35- ```
31+ !!! example "EDF in the default search path"
32+ ```console
33+ $ srun --environment=debian cat /etc/os-release
34+ PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
35+ NAME="Debian GNU/Linux"
36+ VERSION_ID="12"
37+ ...
38+ ```
3639
3740### Use from batch scripts
3841
@@ -63,7 +66,7 @@ The default EDF search path can be changed through the `EDF_PATH` environment va
6366If an EDF is located in the search path, its name can be used in the ` --environment ` option without the ` .toml ` extension.
6467
6568!!! example "Using ` EDF_PATH ` to control the default search path"
66- ```bash
69+ ```console
6770 $ ls ~ /.edf
6871 debian.toml
6972
@@ -140,7 +143,7 @@ To use an image from a different registry, the corresponding registry URL has to
140143!!! example "Using a third-party registry"
141144 * Within an EDF
142145
143- ```bash
146+ ```console
144147 $ cat ${HOME}/.edf/example.toml # (1)
145148 image = "nvcr.io#nvidia/nvhpc:23.7-runtime-cuda11.8-ubuntu22.04"
146149 ```
@@ -149,15 +152,15 @@ To use an image from a different registry, the corresponding registry URL has to
149152
150153 * On the command line
151154
152- ```bash
155+ ```console
153156 $ enroot import docker://nvcr.io#nvidia/nvhpc:23.7-runtime-cuda11.8-ubuntu22.04
154157 ```
155158
156159To import images from private repositories, access credentials should be configured by individual users in the ` $HOME/.config/enroot/.credentials ` file, following the [ netrc file format] ( https://everything.curl.dev/usingcurl/netrc ) .
157160Using the ` enroot import ` documentation page as a reference:
158161
159162??? example "` netrc ` example"
160- ```bash
163+ ```console
161164 # NVIDIA NGC catalog (both endpoints are required)
162165 machine nvcr.io login $oauthtoken password <token >
163166 machine authn.nvidia.com login $oauthtoken password <token >
0 commit comments