SingularityCE is a type of “inner” CEs (meaning it’s used by a jobAgent inside a pilot). A computing element class using singularity containers, where Singularity is supposed to be found on the WN.

The goal of this CE is to start the job in the container set by the “ContainerRoot” config option.

DIRAC can be re-installed within the container.

See the Configuration/Resources/Computing documention for details on where to set the option parameters.

class DIRAC.Resources.Computing.SingularityComputingElement.SingularityComputingElement(ceUniqueID)

Bases: DIRAC.Resources.Computing.ComputingElement.ComputingElement

A Computing Element for running a job within a Singularity container.


Standard constructor.


This method returns the number of available slots in the target CE. The CE instance polls for waiting and running jobs and compares to the limits in the CE parameters.


jobIDList (list) – list of already existing job IDs to be checked against


Method to return information on running and pending jobs.


Get CE description as a dictionary.

This is called by the JobAgent for the case of “inner” CEs.


Initialize the CE parameters after they are collected from various sources


Check if the stored proxy is valid


Check the sanity of the Computing Element definition


Instantiate object representing the backend batch system


batchSystemName (str) – name of the batch system

sendOutput(stdid, line)

Callback function such that the results from the CE may be returned.


Update the CPUTime parameter of the CE classAd, necessary for running in filling mode


Add parameters from the given dictionary overriding the previous values


ceOptions (dict) – CE parameters dictionary to update already defined ones

setProxy(proxy, valid=0)

Set proxy for this instance

setToken(token, valid=0)

Optional method to shutdown the (Inner) Computing Element

submitJob(executableFile, proxy=None, **kwargs)

Start a container for a job. executableFile is ignored. A new wrapper suitable for running in a container is created from jobDesc.


CE helper function to write a CE proxy string to a file.