cwl_utils.image_puller
Classes for docker-extract.
Classes
Helper class that provides a standard way to create an ABC using |
|
Pull docker image with Docker. |
|
Pull docker image with Singularity. |
Module Contents
- class cwl_utils.image_puller.ImagePuller(req, save_directory, cmd, force_pull)
Bases:
digraph inheritance0c9700e4fd { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "ABC" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Helper class that provides a standard way to create an ABC using"]; "ImagePuller" [URL="#cwl_utils.image_puller.ImagePuller",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "ABC" -> "ImagePuller" [arrowsize=0.5,style="setlinewidth(0.5)"]; }abc.ABCHelper class that provides a standard way to create an ABC using inheritance.
- Parameters:
req (str)
save_directory (str | pathlib.Path | None)
cmd (str)
force_pull (bool)
- req
- save_directory
- cmd
- force_pull
- abstractmethod get_image_name()
Get the engine-specific image name.
- Return type:
str
- abstractmethod save_docker_image()
Download and save the image to disk.
- Return type:
None
- class cwl_utils.image_puller.DockerImagePuller(req, save_directory, cmd, force_pull)
Bases:
digraph inheritance1081dc94b8 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "ABC" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Helper class that provides a standard way to create an ABC using"]; "DockerImagePuller" [URL="#cwl_utils.image_puller.DockerImagePuller",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Pull docker image with Docker."]; "ImagePuller" -> "DockerImagePuller" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ImagePuller" [URL="#cwl_utils.image_puller.ImagePuller",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "ABC" -> "ImagePuller" [arrowsize=0.5,style="setlinewidth(0.5)"]; }ImagePullerPull docker image with Docker.
- Parameters:
req (str)
save_directory (str | pathlib.Path | None)
cmd (str)
force_pull (bool)
- get_image_name()
Get the name of the tarball.
- Return type:
str
- generate_udocker_loading_command()
Generate the udocker loading command.
- Return type:
str
- save_docker_image()
Download and save the software container image to disk as a docker tarball.
- Return type:
None
- class cwl_utils.image_puller.SingularityImagePuller(req, save_directory, cmd, force_pull)
Bases:
digraph inheritance4f3cb8b1f8 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "ABC" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Helper class that provides a standard way to create an ABC using"]; "ImagePuller" [URL="#cwl_utils.image_puller.ImagePuller",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "ABC" -> "ImagePuller" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SingularityImagePuller" [URL="#cwl_utils.image_puller.SingularityImagePuller",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Pull docker image with Singularity."]; "ImagePuller" -> "SingularityImagePuller" [arrowsize=0.5,style="setlinewidth(0.5)"]; }ImagePullerPull docker image with Singularity.
- Parameters:
req (str)
save_directory (str | pathlib.Path | None)
cmd (str)
force_pull (bool)
- CHARS_TO_REPLACE = ['/', ':']
- NEW_CHAR = '_'
- get_image_name()
Determine the file name appropriate to the installed version of Singularity.
- Return type:
str
- save_docker_image()
Pull down the Docker software container image and save it in the Singularity image format.
- Return type:
None