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 durablejob_id(the execution ARN) and theartifact_prefixused 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 writesmetadata.jsoninto the same prefix. ComposeRunnerStatus(Lambda Function URL) wrapsDescribeExecution, merges metadata from S3, and exposes a simple status endpoint suitable for polling.ComposeRunnerLogPollerstreams the ECS CloudWatch Logs for a givenartifact_prefix, whileComposeRunnerResultsFetcherreturns presigned URLs for stored artifacts.
- 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
- (One-time per account/region) bootstrap the CDK environment:
cdk bootstrap - 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=32400to control the max wall clock per run-c submitTimeoutSeconds/-c statusTimeoutSeconds/-c pollTimeoutSecondsto tune Lambda timeouts-c taskEphemeralStorageGiBif 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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| compose_runner-0.13.1.tar.gz | 51.6 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| compose_runner-0.13.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 103.2 MB
Release files / compose_runner-0.13.1.tar.gz
| Download URL | compose_runner-0.13.1.tar.gz |
|---|---|
| Size | 51.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f9609968e6b8b9dec314401ac438e96b73b5054e844a3122bbd6e93f942957ef
|
|
BLAKE2b-256 checksum How to use checksums |
b6eb15a6ff304773eb52408d3d0986641b0b1cd80ff03a3ee9c16120bcc5e246
|
| 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.1-py2.py3-none-any.whl
| Download URL | compose_runner-0.13.1-py2.py3-none-any.whl |
|---|---|
| Size | 51.7 MB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
83da2ded6ea9bad886b0f743000634c26efe061f5aeb1dec028d46980a33d2e2
|
|
BLAKE2b-256 checksum How to use checksums |
923ca95e85016dbe66d24dbe437e9c0ba9fc3b8f9280d875f429954d727742e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|