-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Point to a firedrake image that works for us. Create a separate direc…
…tory for Apptainer related files
- Loading branch information
Showing
3 changed files
with
38 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
## Apptainer images | ||
|
||
Apptainer is a container platform designed to run complex applications on HPC clusters. The steps below were tested in Ubuntu 24.04.1 LTS. | ||
|
||
### Installing Apptainer | ||
|
||
Apptainer may be installed with the following instructions (there are issues with previous versions in Ubuntu 24): | ||
```` | ||
sudo apt update | ||
sudo apt install -y wget | ||
cd /tmp | ||
wget https://github.com/apptainer/apptainer/releases/download/v1.3.6/apptainer_1.3.6_amd64.deb | ||
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. | ||
```` | ||
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 | ||
```` | ||
|
||
### Running Apptainer images | ||
|
||
To execute the image in interactive mode: | ||
```` | ||
apptainer shell --bind /tmp/cache-${USER}:/home/firedrake/firedrake/.cache -e devimg.sif | ||
```` | ||
|
||
To execute the image in batch mode: | ||
```` | ||
mkdir /tmp/cache-${USER} | ||
apptainer run --bind /tmp/cache-${USER}:/home/firedrake/firedrake/.cache -e devimg.sif ./workshop_script.sh | ||
```` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters