Skip to content

Commit 01f637a

Browse files
authored
Update 03_apptainer_files.mdx
1 parent cef5eff commit 01f637a

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

docs/hpc/15_tutorial_apptainer/03_apptainer_files.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,27 @@ Files created in these mounted directories remain available after the container
2121

2222
## Binding Additional Directories
2323

24-
Sometimes you may need access to additional directories that are not automatically available inside the container.
24+
Sometimes you may need access to directories through a different path inside the container.
2525

2626
Apptainer allows additional directories to be mounted using the `-B` option:
2727

2828
```bash
2929
apptainer shell \
30-
-B /scratch:/scratch \
30+
-B /scratch/(NetID):/data \
3131
/share/apps/images/ubuntu-24.04.3.sif
3232
```
3333

34-
This makes `/scratch` available inside the container.
34+
In this example, your scratch directory on the host system is made available as `/data` inside the container.
3535

36-
You can also mount a directory at a different location:
36+
After entering the container, you can verify the mount:
3737

3838
```bash
39-
apptainer shell \
40-
-B /scratch:/data \
41-
/share/apps/images/ubuntu-24.04.3.sif
39+
ls /data
4240
```
4341

44-
In this example, files stored in `/scratch` on the host system are accessible through `/data` inside the container.
42+
Any files stored in `/scratch <NetID>` on the host system will be accessible through `/data` inside the container.
43+
44+
The source and destination paths do not need to be the same. This can be useful when an application expects data to be located in a specific directory within the container.
4545

4646
## Why This Matters
4747

0 commit comments

Comments
 (0)