Skip to content

Commit c75ba45

Browse files
committed
Change EDF snippets to 'toml'
1 parent dadaae5 commit c75ba45

File tree

3 files changed

+28
-28
lines changed

3 files changed

+28
-28
lines changed

docs/software/container-engine/edf.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ If not specified, the default value is an empty value of the corresponding type.
1313

1414
!!! example
1515
* Single environment inheritance:
16-
```bash
16+
```toml
1717
base_environment = "common_env"
1818
```
1919

2020
* Multiple environment inheritance:
21-
```bash
21+
```toml
2222
base_environment = ["common_env", "ml_pytorch_env1"]
2323
```
2424

@@ -33,27 +33,27 @@ If not specified, the default value is an empty value of the corresponding type.
3333

3434
!!! example
3535
* Reference of Ubuntu image in the Docker Hub registry (default registry)
36-
```bash
36+
```toml
3737
image = "library/ubuntu:24.04"
3838
```
3939

4040
* Explicit reference of Ubuntu image in the Docker Hub registry
41-
```bash
41+
```toml
4242
image = "docker.io#library/ubuntu:24.04"
4343
```
4444

4545
* Reference to PyTorch image from NVIDIA Container Registry (nvcr.io)
46-
```bash
46+
```toml
4747
image = "nvcr.io#nvidia/pytorch:22.12-py3"
4848
```
4949

5050
* Image from third-party quay.io registry
51-
```bash
51+
```toml
5252
image = "quay.io#madeeks/osu-mb:6.2-mpich4.1-ubuntu22.04-arm64"
5353
```
5454

5555
* Reference to a manually pulled image stored in parallel FS
56-
```bash
56+
```toml
5757
image = "/path/to/image.squashfs"
5858
```
5959

@@ -70,11 +70,11 @@ If not specified, the default value is an empty value of the corresponding type.
7070

7171
!!! example
7272
* Workdir pointing to a user defined project path 
73-
```bash
73+
```toml
7474
workdir = "/home/user/projects"
7575
```
7676
* Workdir pointing to the `/tmp` directory
77-
```bash
77+
```toml
7878
workdir = "/tmp"
7979
```
8080

@@ -83,7 +83,7 @@ If not specified, the default value is an empty value of the corresponding type.
8383
(BOOL) If true, run the entrypoint from the container image. Default: true.
8484

8585
!!! example
86-
```bash
86+
```toml
8787
entrypoint = false
8888
```
8989

@@ -92,7 +92,7 @@ If not specified, the default value is an empty value of the corresponding type.
9292
(BOOL) If false, the container filesystem is read-only. Default: true.
9393

9494
!!! example
95-
```bash
95+
```toml
9696
writable = true
9797
```
9898

@@ -102,17 +102,17 @@ If not specified, the default value is an empty value of the corresponding type.
102102

103103
!!! example
104104
* Literal fixed mount map
105-
```bash
105+
```toml
106106
mounts = ["/capstor/scratch/cscs/amadonna:/capstor/scratch/cscs/amadonna"]
107107
```
108108

109109
* Mapping path with `env` variable expansion
110-
```bash
110+
```toml
111111
mounts = ["/capstor/scratch/cscs/${USER}:/capstor/scratch/cscs/${USER}"]
112112
```
113113

114114
* Mounting the scratch filesystem using a host environment variable
115-
```bash
115+
```toml
116116
mounts = ["${SCRATCH}:/scratch"]
117117
```
118118

@@ -128,14 +128,14 @@ Environment variables to set in the container. Empty string values will unset th
128128

129129
!!! example
130130
* Basic `env` block
131-
```bash
131+
```toml
132132
[env]
133133
MY_RUN = "production",
134134
DEBUG = "false"
135135
```
136136

137137
* Use of environment variable expansion
138-
```bash
138+
```toml
139139
[env]
140140
MY_NODE = "${VAR_FROM_HOST}",
141141
PATH = "${PATH}:/custom/bin",
@@ -154,20 +154,20 @@ OCI-like annotations for the container. For more details, refer to the [Annotati
154154
!!! example
155155

156156
* Disabling the CXI hook
157-
```bash
157+
```toml
158158
[annotations]
159159
com.hooks.cxi.enabled = "false"
160160
```
161161

162162
* Control of SSH hook parameters via annotation and variable expansion
163-
```bash
163+
```toml
164164
[annotations.com.hooks.ssh]
165165
authorize_ssh_key = "/capstor/scratch/cscs/${USER}/tests/edf/authorized_keys"
166166
enabled = "true"
167167
```
168168

169169
* Alternative example for usage of annotation with fixed path
170-
```bash
170+
```toml
171171
[annotations]
172172
com.hooks.ssh.authorize_ssh_key = "/path/to/authorized_keys"
173173
com.hooks.ssh.enabled = "true"

docs/software/container-engine/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Save this file below as `ubuntu.toml` in `${HOME}/.edf` directory (the default
3232
Create `${HOME}/.edf` if the folder doesn't exist.
3333
A more detailed explanation of each entry for the EDF can be seen in the [EDF reference][ref-ce-edf-reference].
3434

35-
```bash
35+
```toml
3636
image = "library/ubuntu:24.04"
3737
mounts = ["/capstor/scratch/cscs/${USER}:/capstor/scratch/cscs/${USER}"]
3838
workdir = "/capstor/scratch/cscs/${USER}"

docs/software/container-engine/resource-hook.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,19 @@ This can be done in multiple ways in TOML: for example, both of the following us
3333

3434
* Attributes can be added to a table only in one place in the TOML file. In other words, each table must be defined in a single square bracket section. For example, in the invalid example below, the `ssh` table was doubly defined both in the `[annotations]` and in the `[annotations.com.hooks.ssh]` sections. See the [TOML format](https://toml.io/en/) spec for more details.
3535

36-
```bash title="Valid"
36+
```toml title="Valid"
3737
[annotations.com.hooks.ssh]
3838
authorize_ssh_key = "${SCRATCH}/tests/edf/authorized_keys"
3939
enabled = "true"
4040
```
4141

42-
```bash title="Valid"
42+
```toml title="Valid"
4343
[annotations]
4444
com.hooks.ssh.authorize_ssh_key = "${SCRATCH}/tests/edf/authorized_keys"
4545
com.hooks.ssh.enabled = "true"
4646
```
4747

48-
```bash title="Invalid"
48+
```toml title="Invalid"
4949
[annotations]
5050
com.hooks.ssh.authorize_ssh_key = "${SCRATCH}/tests/edf/authorized_keys"
5151

@@ -69,7 +69,7 @@ Container hooks let you customize container behavior to fit system-specific need
6969
[](){#ref-ce-cxi-hook}
7070
### HPE Slingshot interconnect 
7171

72-
```bash
72+
```toml
7373
com.hooks.cxi.enabled = "true"
7474
```
7575

@@ -167,7 +167,7 @@ The hook is activated by setting the `com.hooks.cxi.enabled` annotation, which
167167
[](){#ref-ce-aws-ofi-hook}
168168
### AWS OFI NCCL Hook 
169169

170-
```bash
170+
```toml
171171
com.hooks.aws_ofi_nccl.enabled = "true"
172172
com.hooks.aws_ofi_nccl.variant = "cuda12" # (1)
173173
```
@@ -187,7 +187,7 @@ At the moment of writing, 4 plugin variants are configured: `cuda11`, `cuda12`
187187
It sets environment variables to control the behavior of NCCL and the libfabric CXI provider for Slingshot. In particular, the `NCCL_NET_PLUGIN` variable ([link](https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/env.html#nccl-net-plugin)) is set to force NCCL to load the specific network plugin mounted by the hook. This is useful because certain container images (for example, those from NGC repositories) might already ship with a default NCCL plugin. Other environment variables help prevent application stalls and improve performance when using GPUDirect for RDMA communication.
188188

189189
!!! example "EDF for the NGC PyTorch 22.12 image with Cuda 11"
190-
```bash
190+
```toml
191191
image = "nvcr.io#nvidia/pytorch:22.12-py3"
192192
mounts = ["/capstor/scratch/cscs/${USER}:/capstor/scratch/cscs/${USER}"]
193193

@@ -199,7 +199,7 @@ At the moment of writing, 4 plugin variants are configured: `cuda11`, `cuda12`
199199
[](){#ref-ce-ssh-hook}
200200
### SSH Hook
201201

202-
```bash
202+
```toml
203203
com.hooks.ssh.enabled = "true"
204204
com.hooks.ssh.authorize_ssh_key = "<public-key>" # (1)
205205
```
@@ -246,7 +246,7 @@ By default, the server started by the SSH hook listens to port 15263, but this s
246246

247247
### NVIDIA CUDA MPS Hook
248248

249-
```bash
249+
```toml
250250
com.hooks.nvidia_cuda_mps.enabled = "true"
251251
```
252252

0 commit comments

Comments
 (0)