Skip to main content

compose-runner

Python package to execute meta-analyses created using neurosynth compose and NiMARE as the meta-analysis execution engine.

AWS Deployment

This repository includes an AWS CDK application that turns compose-runner into a serverless batch pipeline using Step Functions, AWS Lambda, and ECS Fargate. The deployed architecture works like this:

  • ComposeRunnerSubmit (Lambda Function URL) accepts HTTP requests, validates the meta-analysis payload, and starts a Step Functions execution. The response is immediate and returns both a durable job_id (the execution ARN) and the artifact_prefix used for S3 and log correlation.
  • A Standard state machine runs a single Fargate task (compose_runner.ecs_task) and waits for completion. The container downloads inputs, executes the meta-analysis on up to 4 vCPU / 30 GiB of memory, uploads artifacts to S3, and writes metadata.json into the same prefix.
  • ComposeRunnerStatus (Lambda Function URL) wraps DescribeExecution, merges metadata from S3, and exposes a simple status endpoint suitable for polling.
  • ComposeRunnerLogPoller streams the ECS CloudWatch Logs for a given artifact_prefix, while ComposeRunnerResultsFetcher returns presigned URLs for stored artifacts.
  1. Create a virtual environment and install the CDK dependencies:
    cd infra/cdk
    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
    
  2. (One-time per account/region) bootstrap the CDK environment:
    cdk bootstrap
    
  3. Deploy the stack (supplying the compose-runner version you want baked into the images):
    cdk deploy \
      -c composeRunnerVersion=$(hatch version) \
      -c resultsPrefix=compose-runner/results \
      -c taskCpu=4096 \
      -c taskMemoryMiB=30720
    
    Pass -c resultsBucketName=<bucket> to use an existing S3 bucket, or omit it to let the stack create and retain a dedicated bucket. Additional knobs:
  • -c stateMachineTimeoutSeconds=32400 to control the max wall clock per run
  • -c submitTimeoutSeconds / -c statusTimeoutSeconds / -c pollTimeoutSeconds to tune Lambda timeouts
  • -c taskEphemeralStorageGiB if the default 21 GiB scratch volume is insufficient

The deployment builds both the Lambda image (aws_lambda/Dockerfile) and the Fargate task image (Dockerfile), provisions the Step Functions state machine, and configures a public VPC so each task has outbound internet access. The CloudFormation outputs list the HTTPS endpoints for submission, status, logs, and artifact retrieval, alongside the Step Functions ARN.

Metadata

Release files for compose-runner 0.13.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for compose-runner 0.13.0
File Size Uploaded
compose_runner-0.13.0.tar.gz 51.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for compose-runner 0.13.0
File Interpreter ABI Platform
compose_runner-0.13.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 103.2 MB

Release files / compose_runner-0.13.0.tar.gz

Download URL compose_runner-0.13.0.tar.gz
Size 51.6 MB
Tags Source
SHA-256 checksum
How to use checksums
0beaf74993cbcb701a556c83ff35347df957f1a1c1de1b4e12480d208177f08d
BLAKE2b-256 checksum
How to use checksums
aeed0f158c75f9c03ee9a76295562c9a8aba8f4679d25172028cb870bdb7b87c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / compose_runner-0.13.0-py2.py3-none-any.whl

Download URL compose_runner-0.13.0-py2.py3-none-any.whl
Size 51.7 MB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
3daef7f6c3d7cfcdae63272be52a5185e31f4cf4899e09988841536b907abc19
BLAKE2b-256 checksum
How to use checksums
7a8d8826dbfda0c1756f3bf691e78fe0ddabac16ca034206618a8205be801836
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

0.14.1

2 release files

0.14.0

2 release files

0.13.1

2 release files

This release

0.13.0 This release

2 release files

0.12.1

2 release files

0.12.0

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.9

2 release files

0.7.8

2 release files

0.7.7

2 release files

0.7.6

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page