User-launched Containers with Singularity¶
The OSG pilot container can be launched by users in order to run jobs on resources they have access to. The most common use case, documented here, is to start the pilot container inside a Slurm batch job that is launched by the user.
This is a great way to add personal resources to the Open Science Pool to increase throughput for a specific workflow.
In order to configure the container, you will need:
- A registered resource in OSG Topology; resource registration allows OSG to do proper usage accounting and maintain contacts in case of security incidents.
- An authentication token from the OSG. Please contact OSG support to request a token for your user.
Launching Inside Slurm¶
To launch inside Slurm, one needs to write a small job control script; the details will vary from site-to-site and the followingg is given as an example for running on compute hosts with 24 cores:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
The above example rebuilds the Docker container on each host. If you plan to run large numbers of these jobs, you can download the Docker container once and create a local Singularity image:
$ singularity build osgvo-pilot.sif docker://opensciencegrid/osgvo-docker-pilot:release
In this case, the
singularity run command should be changed to:
singularity run --contain --bind /cvmfs --scratch /pilot osgvo-pilot.sif
Note, unlike the site-launched container, the Singularity container above cannot run payloads inside a separate image.