ganga.GangaCore.Lib.Virtualization.Docker module

The job will be run inside a container using Docker or UDocker as the virtualization method. Docker is tried first and if not installed or permission do not allow it, UDocker is installed and used.

j=Job() j.virtualization = Docker(“fedora:latest”)

The mode of the UDocker running can be modified. The P1 mode is working almost everywhere but might not give the best performance. See https://github.com/indigo-dc/udocker for more details about Udocker.

If the image is a private image, the username and password of the deploy token can be given like

j.virtualization.tokenuser = ‘gitlab+deploy-token-123’ j.virtualization.tokenpassword = ‘gftrh84dgel-245^ghHH’

Note that images stored in a docker repository hosted by Github at present doesn’t work with uDocker as uDocker is not updated to the latest version of the API.

Directories can be mounted from the host to the container using key-value pairs to the mounts option.

j.virtualization.mounts = {‘/cvmfs’:’/cvmfs’}

ganga.GangaCore.Lib.Virtualization.Docker.const_lock

This is a context manager which acquires the const write lock on the object’s root object.

This lock acquires exclusive access over an object tree to prevent it from changing. Reading schema attributes on the object is still allowed but changing them is not. Only one thread can hold this lock at once.