Users of Aurora can benefit from container-based workloads for seamless compatibility across Intel systems. This guide details the use of containers on Aurora, including custom container creation, large-scale execution, and common pitfalls.
We support Apptainer and Podman (documentation coming soon) on Aurora.
Refer to Getting Started on Aurora for additional information. In particular, you need to set the environment variables that provide access to the proxy host.
Note
The instructions below should be run directly from a compute node.
Explicitly, to request an interactive job (from aurora-uan):
Building from Docker or Argonne GitHub Container Registry¶
Containers on Aurora can be built by writing Dockerfiles on a local machine and then publishing the container to DockerHub, or by directly building them on an ALCF compute node by writing an Apptainer recipe file. If you prefer to use existing containers, you can pull them from various registries like DockerHub and run them on Aurora.
Since Docker requires root privileges, which users do not have on Aurora, existing Docker containers must be converted to Apptainer. To build a Docker-based container on Aurora, use the following as an example:
# qsub from a UAN/login nodeqsub-lselect=1-lwalltime=60:00-A<Projectname>-q<Queue>-lfilesystems=<fs1:fs2>-I
# Set proxy on compute nodeexportHTTP_PROXY="http://proxy.alcf.anl.gov:3128"exportHTTPS_PROXY="http://proxy.alcf.anl.gov:3128"exporthttp_proxy="http://proxy.alcf.anl.gov:3128"exporthttps_proxy="http://proxy.alcf.anl.gov:3128"exportftp_proxy="http://proxy.alcf.anl.gov:3128"exportno_proxy="admin,*.hostmgmt.cm.aurora.alcf.anl.gov,*.alcf.anl.gov,localhost"# Load apptainermoduleloadspack-pe-gcc
moduleloadapptainer
moduleloadfuse-overlayfs
# Build postgres imageapptainerbuildpostgres.singdocker://postgres# do this once# Create an environment filecat>>pg.env<<EOFexport POSTGRES_USER=pguserexport POSTGRES_PASSWORD=mypguser123export POSTGRES_DB=mydbexport POSTGRES_INITDB_ARGS="--encoding=UTF-8"EOF# Create a data and run directory to bind to the running containermkdir-ppgdatapgrun
# Start an instance of the container using nohupnohupapptainerrun-Bpgrun:/var/run/postgresql-Bpgdata:/var/lib/postgresql/data--env-filepg.envpostgres.singpostgres&# Save PIDecho$!>pg_pid.txt
echo"Postgres started with PID $(catpg_pid.txt)"# Interact with running container using psql clientapptainerexec\-Bpgrun:/var/run/postgresql\-Bpgdata:/var/lib/postgresql/data\--env-filepg.env\postgres.singpsql-h127.0.0.1-p5432-Upguser-dmydb-c"SELECT version();"# Stop the container and kill the processkill"$(catpg_pid.txt)"rmpg_pid.txt