Skip to content

Commit d9ddd97

Browse files
authored
Replace Singularity with Apptainer in documentation
Updated images and references from Singularity to Apptainer in the introduction section.
1 parent 479bc53 commit d9ddd97

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

docs/hpc/07_containers/01_intro.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $ apptainer pull docker://godlovedc/lolcow
2121
# image name can be for example docker://godlovedc/lolcow
2222
```
2323

24-
![singularity1](./static/singularity1.png)
24+
![apptainer1](./static/apptainer1.png)
2525

2626
### 2. build the image (optional)
2727
```sh
@@ -31,7 +31,7 @@ $ apptainer build <a name of your choosing>.sif <image name>
3131

3232
Building an image is optional for most use cases. In many cases, users can directly run containers pulled from Docker Hub without building a local image.
3333

34-
![singularity2](./static/singularity2.png)
34+
![apptainer2](./static/apptainer2.png)
3535

3636
You can now run your container using the built image.
3737

@@ -49,31 +49,35 @@ Write access is not typically required when running containers. Read-only execut
4949

5050
running this would yield a menu for output:
5151

52-
![singularity3](./static/singularity3.png)
52+
![apptainer3](./static/apptainer3.png)
5353

5454
#### Enter Container
5555
```sh
5656
apptainer shell <image name>.sif
5757
# after this step, you will be going into the container and start your programming
5858
```
5959

60-
![singularity4](./static/singularity4.png)
60+
![apptainer4](./static/apptainer4.png)
6161

6262
:::tip
6363

64-
#### Run commands outside the container
64+
Run commands outside the container
6565

6666
You can run commands for the container using exec arguments without actually going into the container
6767

6868
```sh
6969
$ apptainer exec <image name>.sif <commands>
7070
# adding commands to the back will return the display result of these commands in the container without actually going into the container
7171
```
72+
:::
7273

73-
Example:
74+
### Using fakeroot
7475

75-
![singularity5](./static/singularity5.png)
76-
:::
76+
In some cases, you may need elevated permissions inside the container to install software or modify system files. Apptainer provides a `--fakeroot` option that allows you to run commands inside the container with root-like privileges, without requiring actual root access on the system.
77+
78+
```sh
79+
$ apptainer exec --fakeroot <image name>.sif <commands>
80+
```
7781

7882
That's it! Now you're good to go and can just use these simple steps to run Apptainer images and run your programs.
7983

0 commit comments

Comments
 (0)