Run each CWL CommandLineTool step on a purpose-sized, ephemeral EC2
instance via spore-host/spawn — the CWL
analog of nf-spawn (Nextflow) and
miniwdl-spawn (WDL). Part of the
spore.host suite.
Each step is auto-sized from its CWL ResourceRequirement (via truffle),
launched with a TTL and --on-complete terminate, its inputs/outputs bridged
through S3, and torn down when it finishes — so a workflow costs only the compute
each step actually uses, with no forgotten instances.
pip install cwl-spawnRequires the spawn and truffle CLIs on PATH and AWS credentials for real
runs.
export SPAWN_WORKDIR_S3=s3://my-bucket/cwl-runs # the S3 bridge (required)
export SPAWN_REGION=us-east-1 # optional (default us-east-1)
export SPAWN_TTL=4h # optional TTL backstop
cwl-spawn workflow.cwl inputs.ymlcwl-spawn drives cwltool as a library, replacing the local job runner with
one that dispatches each CommandLineTool to a spawn instance. Standard cwltool
behavior (parsing, scheduling, output collection) is unchanged.
A step's EC2 instance type is chosen by, in order:
- an explicit
spawn:instanceTypehint on the step, - the cheapest instance that fits the step's
ResourceRequirement(coresMin/ramMin) viatruffle search --pick-first, - a default (
t3.medium).
Mirrors the proven miniwdl-spawn / nf-spawn design: the step's command + working
directory are staged to SPAWN_WORKDIR_S3, the instance runs the command, writes
results and a final .exitcode object back to S3 (the durable completion signal
that outlives the self-terminating instance), and cwltool collects the outputs
from the pulled-back working directory.
Apache-2.0