Skip to content

Commit eaeadca

Browse files
committed
Change index.md
1 parent babad2c commit eaeadca

File tree

1 file changed

+33
-21
lines changed

1 file changed

+33
-21
lines changed

docs/software/container-engine/index.md

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ Through the EDF, container use cases can be abstracted to the point where end us
2525
## Quick Start
2626

2727
Let's set up a containerized Ubuntu 24.04 environment on the scratch folder (`${SCRATCH}`).
28+
29+
### Step 1. Create EDF
30+
2831
Save this file below as `ubuntu.toml` in `${HOME}/.edf` directory (the default location of EDF files).
2932
A more detailed explanation of each entry for the EDF can be seen in the [EDF reference][ref-ce-edf-reference].
3033

@@ -34,36 +37,45 @@ mounts = ["/capstor/scratch/cscs/${USER}:/capstor/scratch/cscs/${USER}"]
3437
workdir = "/capstor/scratch/cscs/${USER}"
3538
```
3639

37-
3840
!!! note
3941
Create `${HOME}/.edf` if the folder doesn't exist.
4042

41-
Use Slurm in the cluster login node to start the environment above:
43+
### Step 2. Launch a program with EDF
44+
45+
Use Slurm on the login node to launch a program inside the environment.
46+
Notice that the environment (EDF) is specified with the `--environment` option.
47+
CE pulls the image automatically when the container starts.
4248

4349
```bash
44-
$ srun --environment=ubuntu --pty bash
50+
$ srun --environment=ubuntu echo "Hello"
51+
Hello
4552
```
4653

47-
The terminal snippet below demonstrates how to launch a containerized environment using Slurm with the `--environment` option.
48-
Notice that CE pulls the image automatically when the container starts.
54+
Or, use `--pty` to directly enter the environment.
4955

50-
```console
51-
[daint-ln002]$ srun --environment=ubuntu --pty bash # (1)
56+
```bash
57+
$ srun --environment=ubuntu --pty bash
58+
[compute-node]$
59+
```
5260

53-
[nid005333]$ pwd # (2)
54-
/capstor/scratch/cscs/<username>
61+
??? example "Entering the defined environment"
62+
```console
63+
[daint-ln002]$ srun --environment=ubuntu --pty bash # (1)
5564

56-
[nid005333]$ cat /etc/os-release # (3)
57-
PRETTY_NAME="Ubuntu 24.04 LTS"
58-
NAME="Ubuntu"
59-
VERSION_ID="24.04"
60-
...
65+
[nid005333]$ pwd # (2)
66+
/capstor/scratch/cscs/<username>
6167

62-
[nid005333]$ exit # (4)
63-
[daint-ln002]$
64-
```
68+
[nid005333]$ cat /etc/os-release # (3)
69+
PRETTY_NAME="Ubuntu 24.04 LTS"
70+
NAME="Ubuntu"
71+
VERSION_ID="24.04"
72+
...
73+
74+
[nid005333]$ exit # (4)
75+
[daint-ln002]$
76+
```
6577

66-
1. Starting an interactive shell session within the Ubuntu 24.04 container deployed on a compute node using `srun --environment=ubuntu --pty bash`.
67-
2. Check the current folder (dubbed _the working directory_) is set to the user's scratch folder, as per EDF.
68-
3. Show the OS version of your container (using `cat /etc/os-release`) based on Ubuntu 24.04 LTS.
69-
4. Exiting the container (`exit`), returning to the login node.
78+
1. Starting an interactive shell session within the Ubuntu 24.04 container deployed on a compute node using `srun --environment=ubuntu --pty bash`.
79+
2. Check the current folder (dubbed _the working directory_) is set to the user's scratch folder, as per EDF.
80+
3. Show the OS version of your container (using `cat /etc/os-release`) based on Ubuntu 24.04 LTS.
81+
4. Exiting the container (`exit`), returning to the login node.

0 commit comments

Comments
 (0)