Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v7r3] Replace singularity with apptainer #6440

Draft
wants to merge 4 commits into
base: rel-v7r3
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dirac.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -457,16 +457,16 @@ Resources

}

Singularity
Apptainer
{

# The root image location for the container to use
# Default: /cvmfs/cernvm-prod.cern.ch/cvm4
ContainerRoot = /cvmfs/cernvm-prod.cern.ch/cvm4

# The binary to start the container
# default: singularity
ContainerBin = /opt/extras/bin/singularity
# default: apptainer
ContainerBin = /opt/extras/bin/apptainer

# List of directories to bind
ContainerBind = /etc/grid-security,someDir:::BoundHere
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ This sub-subsection specifies the attributes of each particular CE of the site.
+----------------------------------------------------+-------------------------------------------------------------+--------------------------------+
| *<CE_NAME>/LocalCEType* | Type of 'Inner' CE, normally empty. Default = "InProcess". | LocalCEType = Pool |
| | Possibilities: potentially all CE types, but in practice | |
| | the most valid would be: InProcess, Sudo, Singularity, Pool.| |
| | the most valid would be: InProcess, Sudo, Apptainer, Pool. | |
| | Pool CE in turn uses InProcess (Default) | |
| | or Sudo or Singularity. To specify, use Pool/ce_type. | LocalCEType = Pool/Singularity |
| | or Sudo or Apptainer. To specify, use Pool/ce_type. | LocalCEType = Pool/Apptainer |
| | This option can also go at the Queue level. | |
+----------------------------------------------------+-------------------------------------------------------------+--------------------------------+
| *<CE_NAME>/OS* | CE operating system in a DIRAC format | OS = ScientificLinux_Boron_5.3 |
Expand Down Expand Up @@ -106,7 +106,7 @@ This sub-subsection specifies the attributes of each particular CE of the site.
+----------------------------------------------------+-------------------------------------------------------------+--------------------------------+
| *<CE_NAME>/Queues/<QUEUE_NAME>/RequiredTag* | List of required tags that a job to be eligible must have | RequiredTag = GPU,96RAM |
+----------------------------------------------------+-------------------------------------------------------------+--------------------------------+
| *<CE_NAME>/Queues/<QUEUE_NAME>/LocalCEType* | Same as *<CE_NAME>/LocalCEType* (see above) but per queue. | LocalCEType = Pool/Singularity |
| *<CE_NAME>/Queues/<QUEUE_NAME>/LocalCEType* | Same as *<CE_NAME>/LocalCEType* (see above) but per queue. | LocalCEType = Pool/Apptainer |
+----------------------------------------------------+-------------------------------------------------------------+--------------------------------+


Expand Down Expand Up @@ -149,7 +149,7 @@ An example for this session follows::
MaxTotalJobs = 5000
MaxWaitingJobs = 200
maxCPUTime = 7776
LocalCEType = Pool/Singularity
LocalCEType = Pool/Apptainer
Tag = MultiProcessor
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ A pilot has, at a minimum, to:
- configure DIRAC
- run the JobAgent

A pilot has to run on each and every computing resource type, provided that:
A pilot has to run on each and every computing resource type, provided that the worker node contains:

- Python 2.6+ on the WN
- It is an OS onto which we can install a DIRAC client.
- if that's not possible, we plan to add support for singularity
- Python 2.7+
- Linux distribution with glibc 2.17 or later
- A x86_64, aarch64 or ppc64le CPU

The same pilot script can be used everywhere.

Expand Down
2 changes: 1 addition & 1 deletion src/DIRAC/ConfigurationSystem/Client/Utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def makeNewQueueName(queueName, ceType):
tag = queueDict.get("Tag", "")
reqTag = queueDict.get("RequiredTag", "")
# LocalCEType can be empty (equivalent to "InProcess")
# or "Pool", "Singularity", but also "Pool/Singularity"
# or "Pool", "Apptainer", but also "Pool/Apptainer"
localCEType = queueDict.get("LocalCEType", "")
try:
localCEType_inner = localCEType.split("/")[1]
Expand Down
2 changes: 1 addition & 1 deletion src/DIRAC/Resources/Cloud/Utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def createCloudInitScript(vmParameters, bootstrapParameters):
"dirac-site": parameters.get("Site"),
"submit-pool": parameters.get("SubmitPool", ""),
"ce-name": parameters.get("CEName"),
"ce-type": parameters.get("InnerCEType", "Singularity"),
"ce-type": parameters.get("InnerCEType", "Apptainer"),
"image-name": parameters.get("Image"),
"vm-uuid": parameters.get("VMUUID"),
"vmtype": parameters.get("VMType"),
Expand Down
3 changes: 1 addition & 2 deletions src/DIRAC/Resources/Cloud/cloudinit.template
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,12 @@ yum_repos:

packages:
- cvmfs
- singularity
%(extra-packages)s

%(ssh-user)s

runcmd:
# Allow nested singularity
# Allow nested apptainer
- [ sysctl, user.max_user_namespaces=150000 ]
# Enable CVMFS
- [ mkdir, -p, /mnt/cvmfs ]
Expand Down
Loading