toil.batchSystems.contained_executor

Executor for running inside a container.

Useful for Kubernetes batch system and TES batch system plugin.

Module Contents

Functions

pack_job(job_desc[, user_script, environment])

Create a command that, when run, will execute the given job.

executor()

Main function of the _toil_contained_executor entrypoint.

Attributes

logger

toil.batchSystems.contained_executor.logger
toil.batchSystems.contained_executor.pack_job(job_desc, user_script=None, environment=None)[source]

Create a command that, when run, will execute the given job.

Parameters:
  • job_desc (toil.job.JobDescription) – Job description for the job to run.

  • user_script (Optional[toil.resource.Resource]) – User script that will be loaded before the job is run.

  • environment (Optional[Dict[str, str]]) – Environment variable dict that will be applied before the job is run.

Returns:

Command to run the job, as an argument list that can be run inside the Toil appliance container.

Return type:

List[str]

toil.batchSystems.contained_executor.executor()[source]

Main function of the _toil_contained_executor entrypoint.

Runs inside the Toil container.

Responsible for setting up the user script and running the command for the job (which may in turn invoke the Toil worker entrypoint).

Return type:

None