View on GitHub

Geant4 Zero to Hero

The Definitive Guide for End Users

Home Get Geant4 physino/geant4

Apptainer

The Geant4 Apptainer/Singularity image can be pulled from sylabs:

singularity pull geant4.sif library://physino/geant4/latest

or

apptainer pull library://physino/geant4/latest

Note that you may need to set the location of your Apptainer remote library before pull:

apptainer remote add sylabs https://cloud.sylabs.io
apptainer remote use sylabs
apptainer remote list

The sif file can be directly used as an executable:

./geant4.sif example.mac

For Apptainer Image Developer

g4.def in this folder is used to generate the Apptainer/Singularity images from the physino/geant4 Docker image using the following commands:

apptainer build --fakeroot geant4.sif g4.def

You can also use the remote build option provided by Singularity to build the image in https://cloud.sylabs.io:

apptainer build -r geant4.sif g4.def

I sign and push the image to https://cloud.sylabs.io/library/physino/geant4/latest using the following commands:

# create a PGP signature
apptainer key newpair
# use that signature to sign the image
apptainer sign geant4.sif
# get an access token from https://cloud.sylabs.io and then
apptainer remote login
apptainer push geant4.sif library://physino/geant4/latest

By default apptainer pull libray://physino/geant4/latest will pull library://physino/geant4/latest:latest. The latest tag has to be assigned to the image for this default behavior to work out.