Skip to content

Commit

Permalink
[138] Fix some instructions for running Apptainer images
Browse files Browse the repository at this point in the history
  • Loading branch information
SouzaEM committed Jan 22, 2025
1 parent c9edc2a commit 2002609
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apptainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Apptainer is a container platform designed to run complex applications on HPC cl

### Installing Apptainer

Apptainer may be installed with the following instructions (there are issues with previous versions in Ubuntu 24):
Apptainer may be installed with the following instructions (there are issues with previous versions of Apptainer in Ubuntu 24):
````
sudo apt update
sudo apt install -y wget
Expand All @@ -15,12 +15,12 @@ sudo apt install -y ./apptainer_1.3.6_amd64.deb

### Building Apptainer images

In spyro, the Apptainer image is based on the [Docker image](../docker/). Converting from Docker to Apptainer is more productive because Apptainer does not support image layers by design. Then, it is necessary to rerun all the instructions of the definition file when creating Apptainer images even when just one instruction is added for testing purposes.
In spyro, the Apptainer image is based on the [Docker image](../docker/). Converting from Docker to Apptainer is more productive because Apptainer does not support image layers by design. Then, it is necessary to rerun all the instructions of the definition file when creating Apptainer images even when just one instruction is added (for example, for testing purposes).
````
export IMAGE_ID=$(sudo docker images -q devtag:1.0)
sudo docker save $IMAGE_ID -o devimg.tar
sudo chown $USER:$USER devimg.tar
apptainer build devimg.sif docker-archive://devimg.tar
sudo apptainer build devimg.sif docker-archive://devimg.tar
````

### Running Apptainer images
Expand All @@ -32,10 +32,10 @@ apptainer overlay create --size 1024 /tmp/ext3_overlay.img

To execute the image in interactive mode:
````
apptainer shell --overlay overlay.img -e devimg.sif
apptainer shell --overlay /tmp/ext3_overlay.img -e devimg.sif
````

To execute the image in batch mode:
````
apptainer run --overlay overlay.img -e devimg.sif <script>
apptainer run --overlay /tmp/ext3_overlay.img -e devimg.sif <script>
````

0 comments on commit 2002609

Please sign in to comment.