Intro Containers 1 Basic Spring23
Intro Containers 1 Basic Spring23
Spring 2023
High Performance Research Computing | hprc.tamu.edu
2
| NSF Awards #2112356 #2019129
Outline
● Overview of Containers
● Overview of Singularity
● Obtaining a Container Image
● Container Usage Basics
● Shareability:
○ Share your container image file by uploading to a public
repository
○ Use images shared by others
● Portability:
○ Use images on any computer with the same architecture
(x84-64)
● Reproducibility:
○ Container users are largely unaffected by changes to the
cluster environments
See https://apptainer.org/user-docs/3.8/
● Off campus:
○ Set up and start VPN (Virtual Private Network):
u.tamu.edu/VPnetwork
● SSH command is required for accessing FASTER:
○ ssh [email protected]
● SSH programs for Windows:
○ MobaXTerm (preferred, includes SSH and X11)
○ PuTTY SSH
○ Windows Subsystem for Linux
hprc.tamu.edu/wiki/HPRC:Access
● Off campus:
○ Set up and start VPN (Virtual Private Network):
u.tamu.edu/VPnetwork
● Portal:
○ https://portal-faster.hprc.tamu.edu/
○ Select the “Clusters” tab and then “_faster Shell Access”
## JOB SPECIFICATIONS
#SBATCH --job-name=sing_pull #Set the job name to "sing_pull"
#SBATCH --time=01:00:00 #Set the wall clock limit to 1hr
#SBATCH --ntasks=4 #Request 4 task
#SBATCH --mem=2560M #Request 2560MB (2.5GB) per node
#SBATCH --output=sing_pull.%j #Send stdout/err to "sing_pull.[jobID]"
# execute download
singularity pull hello-world.sif docker://hello-world
/scratch/data/Singularity/images/
https://hprc.tamu.edu/wiki/SW:Singularity:Examples#Prebu
ilt_images
Three methods:
● Interactive: singularity shell
● Batch processing: singularity exec
● Container-as-executable: singularity run
Notice that your variables like $SCRATCH get passed into the
container by default, but the container can override them.
#!/bin/bash
## JOB SPECIFICATIONS
#SBATCH --job-name=sing_test #Set the job name to "sing_test"
#SBATCH --time=00:10:00 #Set the wall clock limit to 1hr and 30min
#SBATCH --ntasks=4 #Request 4 task
#SBATCH --mem=2560M #Request 2560MB (2.5GB) per node
#SBATCH --output=sing_test.%j #Send stdout/err to "sing_test.[jobID]"
export SINGULARITY_BINDPATH="/scratch,$TMPDIR"
Please fill out the survey to let us know how you feel about this
short course. This will help us improve.