Warning

This document is for an old release of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

galaxy.tool_util.deps.container_resolvers package

The module defines the abstract interface for resolving container images for tool execution.

class galaxy.tool_util.deps.container_resolvers.ResolutionCache(**kwds)[source]

Bases: Bunch

Simple cache for duplicated computation created once per set of requests (likely web request in Galaxy context).

This should not be assumed to be thread safe - resolution using a given cache should all occur one resolution at a time in a single thread.

mulled_resolution_cache: Optional[Cache] = None
class galaxy.tool_util.deps.container_resolvers.ContainerResolver(app_info=None, **kwds)[source]

Bases: Dictifiable

Description of a technique for resolving container images for tool execution.

dict_collection_visible_keys = ['resolver_type', 'can_uninstall_dependencies', 'builds_on_resolution']
can_uninstall_dependencies = False
builds_on_resolution = False
read_only = True
__init__(app_info=None, **kwds)[source]

Default initializer for ContainerResolver subclasses.

abstract resolve(enabled_container_types, tool_info, resolution_cache=None, **kwds)[source]

Find a container matching all supplied requirements for tool.

The supplied argument is a galaxy.tool_util.deps.containers.ToolInfo description of the tool and its requirements.

abstract property resolver_type

Short label for the type of container resolution.

Submodules

galaxy.tool_util.deps.container_resolvers.explicit module

This module describes the ExplicitContainerResolver ContainerResolver plugin.

class galaxy.tool_util.deps.container_resolvers.explicit.ExplicitContainerResolver(app_info=None, **kwds)[source]

Bases: ContainerResolver

Find explicit containers referenced in the tool description (e.g. tool XML file) if present.

resolver_type = 'explicit'
resolve(enabled_container_types, tool_info, **kwds)[source]

Find a container explicitly mentioned in tool description.

This ignores the tool requirements and assumes the tool author crafted a correct container.

class galaxy.tool_util.deps.container_resolvers.explicit.ExplicitSingularityContainerResolver(app_info=None, **kwds)[source]

Bases: ExplicitContainerResolver

resolver_type = 'explicit_singularity'
container_type = 'singularity'
resolve(enabled_container_types, tool_info, **kwds)[source]

Find a container explicitly mentioned in tool description.

This ignores the tool requirements and assumes the tool author crafted a correct container. We use singularity here to fetch docker containers, hence the container_description hack here.

class galaxy.tool_util.deps.container_resolvers.explicit.CachedExplicitSingularityContainerResolver(*args, **kwargs)[source]

Bases: CliContainerResolver

resolver_type = 'cached_explicit_singularity'
container_type = 'singularity'
cli = 'singularity'
__init__(*args, **kwargs)[source]

Default initializer for ContainerResolver subclasses.

resolve(enabled_container_types, tool_info, install=False, **kwds)[source]

Find a container explicitly mentioned in tool description.

This ignores the tool requirements and assumes the tool author crafted a correct container. We use singularity here to fetch docker containers, hence the container_description hack here.

class galaxy.tool_util.deps.container_resolvers.explicit.FallbackContainerResolver(app_info=None, identifier='', **kwds)[source]

Bases: BaseAdminConfiguredContainerResolver

Specify an explicit, identified container as a Docker container resolver.

resolver_type = 'fallback'
container_type = 'docker'
__init__(app_info=None, identifier='', **kwds)[source]

Default initializer for ContainerResolver subclasses.

resolve(enabled_container_types, tool_info, **kwds)[source]

Find a container matching all supplied requirements for tool.

The supplied argument is a galaxy.tool_util.deps.containers.ToolInfo description of the tool and its requirements.

class galaxy.tool_util.deps.container_resolvers.explicit.FallbackSingularityContainerResolver(app_info=None, identifier='', **kwds)[source]

Bases: FallbackContainerResolver

Specify an explicit, identified container as a Singularity container resolver.

resolver_type = 'fallback_singularity'
container_type = 'singularity'
class galaxy.tool_util.deps.container_resolvers.explicit.FallbackNoRequirementsContainerResolver(app_info=None, identifier='', **kwds)[source]

Bases: FallbackContainerResolver

resolver_type = 'fallback_no_requirements'
class galaxy.tool_util.deps.container_resolvers.explicit.FallbackNoRequirementsSingularityContainerResolver(app_info=None, identifier='', **kwds)[source]

Bases: FallbackNoRequirementsContainerResolver

resolver_type = 'fallback_no_requirements_singularity'
container_type = 'singularity'
class galaxy.tool_util.deps.container_resolvers.explicit.MappingContainerResolver(app_info=None, **kwds)[source]

Bases: BaseAdminConfiguredContainerResolver

resolver_type = 'mapping'
__init__(app_info=None, **kwds)[source]

Default initializer for ContainerResolver subclasses.

resolve(enabled_container_types, tool_info, **kwds)[source]

Find a container matching all supplied requirements for tool.

The supplied argument is a galaxy.tool_util.deps.containers.ToolInfo description of the tool and its requirements.

class galaxy.tool_util.deps.container_resolvers.explicit.RequiresGalaxyEnvironmentContainerResolver(app_info=None, identifier='', **kwds)[source]

Bases: FallbackContainerResolver

resolver_type = 'requires_galaxy_environment'
class galaxy.tool_util.deps.container_resolvers.explicit.RequiresGalaxyEnvironmentSingularityContainerResolver(app_info=None, identifier='', **kwds)[source]

Bases: RequiresGalaxyEnvironmentContainerResolver

resolver_type = 'requires_galaxy_environment_singularity'
container_type = 'singularity'

galaxy.tool_util.deps.container_resolvers.mulled module

This module describes the MulledContainerResolver ContainerResolver plugin.

class galaxy.tool_util.deps.container_resolvers.mulled.CachedMulledDockerContainerResolver(app_info=None, namespace='biocontainers', hash_func='v2', **kwds)[source]

Bases: CliContainerResolver

resolver_type = 'cached_mulled'
shell = '/bin/bash'
__init__(app_info=None, namespace='biocontainers', hash_func='v2', **kwds)[source]

Default initializer for ContainerResolver subclasses.

resolve(enabled_container_types, tool_info, **kwds)[source]

Find a container matching all supplied requirements for tool.

The supplied argument is a galaxy.tool_util.deps.containers.ToolInfo description of the tool and its requirements.

class galaxy.tool_util.deps.container_resolvers.mulled.CachedMulledSingularityContainerResolver(app_info=None, hash_func='v2', **kwds)[source]

Bases: SingularityCliContainerResolver

resolver_type = 'cached_mulled_singularity'
shell = '/bin/bash'
__init__(app_info=None, hash_func='v2', **kwds)[source]

Default initializer for ContainerResolver subclasses.

resolve(enabled_container_types, tool_info, **kwds)[source]

Find a container matching all supplied requirements for tool.

The supplied argument is a galaxy.tool_util.deps.containers.ToolInfo description of the tool and its requirements.

class galaxy.tool_util.deps.container_resolvers.mulled.MulledDockerContainerResolver(app_info=None, namespace='biocontainers', hash_func='v2', auto_install=True, **kwds)[source]

Bases: CliContainerResolver

Look for mulled images matching tool dependencies.

resolver_type = 'mulled'
shell = '/bin/bash'
protocol: Optional[str] = None
__init__(app_info=None, namespace='biocontainers', hash_func='v2', auto_install=True, **kwds)[source]

Default initializer for ContainerResolver subclasses.

cached_container_description(targets, namespace, hash_func, resolution_cache)[source]
pull(container)[source]
property can_list_containers
resolve(enabled_container_types, tool_info, install=False, session=None, **kwds)[source]

Find a container matching all supplied requirements for tool.

The supplied argument is a galaxy.tool_util.deps.containers.ToolInfo description of the tool and its requirements.

class galaxy.tool_util.deps.container_resolvers.mulled.MulledSingularityContainerResolver(app_info=None, namespace='biocontainers', hash_func='v2', auto_install=True, **kwds)[source]

Bases: SingularityCliContainerResolver, MulledDockerContainerResolver

resolver_type = 'mulled_singularity'
protocol: Optional[str] = 'docker://'
__init__(app_info=None, namespace='biocontainers', hash_func='v2', auto_install=True, **kwds)[source]

Default initializer for ContainerResolver subclasses.

cached_container_description(targets, namespace, hash_func, resolution_cache)[source]
property can_list_containers
pull(container)[source]
class galaxy.tool_util.deps.container_resolvers.mulled.BuildMulledDockerContainerResolver(app_info=None, namespace='local', hash_func='v2', auto_install=True, **kwds)[source]

Bases: CliContainerResolver

Build for Docker mulled images matching tool dependencies.

resolver_type = 'build_mulled'
shell = '/bin/bash'
builds_on_resolution = True
__init__(app_info=None, namespace='local', hash_func='v2', auto_install=True, **kwds)[source]

Default initializer for ContainerResolver subclasses.

resolve(enabled_container_types, tool_info, install=False, **kwds)[source]

Find a container matching all supplied requirements for tool.

The supplied argument is a galaxy.tool_util.deps.containers.ToolInfo description of the tool and its requirements.

class galaxy.tool_util.deps.container_resolvers.mulled.BuildMulledSingularityContainerResolver(app_info=None, hash_func='v2', auto_install=True, **kwds)[source]

Bases: SingularityCliContainerResolver

Build for Singularity mulled images matching tool dependencies.

resolver_type = 'build_mulled_singularity'
shell = '/bin/bash'
builds_on_resolution = True
__init__(app_info=None, hash_func='v2', auto_install=True, **kwds)[source]

Default initializer for ContainerResolver subclasses.

resolve(enabled_container_types, tool_info, install=False, **kwds)[source]

Find a container matching all supplied requirements for tool.

The supplied argument is a galaxy.tool_util.deps.containers.ToolInfo description of the tool and its requirements.