Using singularity containers to request different Operative Systems
Singularity[1] allows users to specify their own OS container images to CMS Tier Sites that support it. This means that even if a worker node native operative system is e.g RHEL6, users can run under RHEL7 on it, as long as the tier site supports singularity.
Singularity has been integrated with the Global Pool and is the standard containerization method in CMS.
Requesting RedHat 6 and RedHat 7 operative systems
Jobs submitted to the system that don't specify an OS will use RHEL6 by default. Users can choose to run jobs under RHEL6 (the default), RHEL7, or any of them by simply specifying "+REQUIRED_OS" into their submit file.
# Use "rhel6", "rhel7" or "any" for RedHat6, RedHat7, or any of them, respectively. +REQUIRED_OS = "rhel7"
The following example illustrates how to run jobs under RedHat 7.
$ tutorial os $ cd tutorial-os $ condor_submit tutorial_os.submit Submitting job(s). 1 job(s) submitted to cluster 649661.
After the job has finished, you will be able to see the Operative System version in the output:
$ cat log/job.out.649661-0 ... Start time: Wed Oct 11 20:14:43 EDT 2017 Job is running on node: t2bat0198.cmsaf.mit.edu Job running as user: uid=11729(cmsu0725) gid=11729(cmsu0725) groups=11729(cmsu0725) Job is running in directory: /srv Operative system: CentOS Linux release 7.4.1708 (Core) Working hard... Science complete!
Creating your own container images
Although users should not normally need to create their own custom singularity container images, this is supported. The images need to be added to the OSG oasis cvmfs repository. To create your own container image, you can follow this guide. After that, they will be listed in /cvmfs/singularity.opensciencegrid.org
$ ls /cvmfs/singularity.opensciencegrid.org/opensciencegrid osg-3.3-wn-el6:latest osgvo-blaylockbk:latest osgvo-el6:latest osgvo-el7:latest osgvo-ubuntu-xenial:latest osg-wn:3.3-el6 osg-wn:3.3-testing-el7 tensorflow:latest osg-3.3-wn-el7:latest osgvo:el6 osgvo:el7 osgvo-torch:latest osg-wn:3.3-devel-el7 osg-wn:3.3-el7 tensorflow-gpu:latest
Using specific container images
Users can run in whatever singularity image available on /cvmfs/singularity.opensciencegrid.org/opensciencegrid. For example, the OSG builds images with tensorflow. To run on an image with a ready-to-use tensorflow installed on it, you can add the following to your submit file:
Requirements = HAS_SINGULARITY == True +SingularityImage = "/cvmfs/singularity.opensciencegrid.org/opensciencegrid/tensorflow:latest"
For more details on this and for a table with default singularity images provided by the OSG, visit this link [3].
References
[1] http://singularity.lbl.gov/