Skip to content

Commit 516e3ea

Browse files
committed
Update run.md
1 parent 0051198 commit 516e3ea

File tree

1 file changed

+17
-17
lines changed
  • docs/software/container-engine

1 file changed

+17
-17
lines changed

docs/software/container-engine/run.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
## Running containerized environments
22

3-
Specifying the `--environment` option to the Slurm command (e.g., `srun` or `salloc`) will make it run inside the EDF environment:
3+
Specifying the `--environment` option to the Slurm command (e.g., `srun` or `salloc`) will make it run inside the EDF environment.
4+
There are three ways to do so:
45

5-
```console
6-
$ srun --environment=$SCRATCH/edf/debian.toml cat /etc/os-release
7-
```
6+
1. **Through an absolute path**: providing an absolute path to EDF.
87

9-
`--environment` can be a relative path from the current working directory (i.e., where the Slurm command is executed).
10-
A relative path should be prepended by `./`:
11-
12-
```console
13-
$ srun --environment=./debian.toml cat /etc/os-release # (1)
14-
```
8+
```console
9+
$ srun --environment=$SCRATCH/edf/debian.toml cat /etc/os-release
10+
```
1511

16-
1. Assuming `debian.toml` is in the current folder.
12+
2. **Through a relative path**: providing a relative path to EDF. The path is from the current working directory (i.e., where the Slurm command is executed). Should be prepended by `./`.
1713

18-
If an EDF is located in the [EDF search path][ref-ce-edf-search-path], `--environment` also accepts the EDF filename without the `.toml` extension:
14+
```console
15+
$ srun --environment=./debian.toml cat /etc/os-release # (1)
16+
```
17+
1. Assuming `debian.toml` is in the current folder.
1918

20-
```console
21-
$ srun --environment=debian cat /etc/os-release # (1)
22-
```
19+
3. **From EDF search paths**: providing the name of EDF in [EDF search path][ref-ce-edf-search-path]. `--environment` also accepts the EDF filename without the `.toml` extension:
2320

24-
1. Assuming `debian.toml` is in the EDF search path.
21+
```console
22+
$ srun --environment=debian cat /etc/os-release # (1)
23+
```
24+
1. Assuming `debian.toml` is in the EDF search path.
2525

2626
### Use from batch scripts
2727

2828
The recommended approach is to use `--environment` as part of the Slurm command (e.g., `srun` or `salloc`):
2929

3030
!!! example "`srun` inside a batch script with EDF"
31-
```console
31+
```bash
3232
#!/bin/bash
3333
#SBATCH --job-name=edf-example
3434
#SBATCH --time=00:01:00

0 commit comments

Comments
 (0)