Skip to main content

miniwdl container backend that runs WDL tasks as jobs on the Fovus Serverless HPC Platform, grouped under one Fovus pipeline per workflow.

Project description

miniwdl-fovus

Run WDL workflows on the Fovus Serverless HPC Platform using miniwdl.

miniwdl-fovus registers a miniwdl container backend (fovus_job) that submits each WDL task as a containerized Fovus job, grouping every task of a run under a single Fovus pipeline so the whole workflow appears as one pipeline on app.fovus.co with unified status / stop / resume.

It talks to Fovus by shelling out to the official fovus CLI — the same approach as Fovus's Nextflow plugin nf-fovus.

How it works

miniwdl run (cfg: container_backend = fovus_job)
        │
        ├─ one Fovus pipeline per run (fovus pipeline create)
        │
        └─ per WDL task:  FovusJob(TaskContainer)
                            ├─ build job-config JSON from runtime{} Fovus attrs
                            ├─ fovus job create <cfg> <task_dir> --pipeline-id ...
                            ├─ poll: fovus job status --job-id ...
                            └─ read rc / stdout / stderr from the shared mount

Shared-storage I/O model

Fovus storage is mounted (fovus storage mount) at one path that exists on the miniwdl host and on every Fovus compute node. The miniwdl run directory lives on that mount, so — like miniwdl-aws's EFS backend — container_dir == host_dir. There is no per-task upload, no fovus job download: a task's outputs are visible to the host the moment its Fovus job finishes. Inputs produced by upstream tasks are staged into each task's directory on the same mount (a copy within Fovus storage).

Installation

pip install miniwdl-fovus    # pulls in miniwdl-fovus-runtime and the fovus CLI
fovus auth login             # authenticate once

miniwdl-fovus depends on miniwdl-fovus-runtime, a Fovus-patched build of miniwdl (import package still WDL) that adds non-POSIX shared-storage support. Do not also install stock miniwdl in the same environment. Compatibility: miniwdl-fovus 1.0.x <-> miniwdl-fovus-runtime 1.14.2.post1.

Usage

The simplest path is the bundled wrapper, which verifies auth, mounts the shared storage, creates the pipeline, and runs miniwdl with the right config and run dir (default --dir: /fovus-storage/pipelines/<pipeline_id>/fovus-work):

miniwdl-fovus run workflow.wdl -i inputs.json --pipeline-name my-run \
    --storage-mount-point /fovus-storage

Or drive miniwdl run directly once storage is mounted and auth is set up:

fovus storage mount /fovus-storage
miniwdl run workflow.wdl -i inputs.json \
    --cfg $(python -c "import miniwdl_fovus,os;print(os.path.join(os.path.dirname(miniwdl_fovus.__file__),'fovus.cfg'))") \
    --dir /fovus-storage/miniwdl_run

The run directory (--dir) must be under the storage mount point.

Declaring Fovus resources in WDL

Tasks declare Fovus-native resources directly in runtime{}, using the Fovus job-config field names verbatim (no prefix). Anything omitted falls back to the [fovus] defaults in the config.

task align {
    command <<< ... >>>
    runtime {
        docker: "biocontainers/bwa:latest"   # task image (required)
        benchmarkingProfileName: "Default CPU"
        minvCpu: 4
        maxvCpu: 16
        minvCpuMemGiB: 8
        minGpu: 0
        storageGiB: 100
        walltimeHours: 3
        supportedCpuArchitectures: ["x86-64", "arm-64"]
        timeToCostPriorityRatio: "0.5/0.5"
        allowPreemptible: false
    }
}
runtime key Fovus job-config field
benchmarkingProfileName constraints.jobConstraints.benchmarkingProfileName
supportedCpuArchitectures constraints.jobConstraints.supportedCpuArchitectures
allowPreemptible constraints.jobConstraints.allowPreemptible
minvCpu / maxvCpu constraints.taskConstraints.minvCpu / maxvCpu
minvCpuMemGiB constraints.taskConstraints.minvCpuMemGiB
minGpu / maxGpu constraints.taskConstraints.minGpu / maxGpu
storageGiB constraints.taskConstraints.storageGiB
walltimeHours constraints.taskConstraints.walltimeHours
timeToCostPriorityRatio objective.timeToCostPriorityRatio

Power users can bypass the builder entirely with configJson: "/path/to/job_config.json" — the file is used verbatim, with the generated runCommand injected.

Configuration

All [fovus] keys (see miniwdl_fovus/fovus.cfg) can be overridden by environment variable, e.g. MINIWDL__FOVUS__BENCHMARKING_PROFILE_NAME="Default CPU".

Key settings: storage_mount_point, poll_interval_seconds, auto_stop_pipeline_on_exit (stop the pipeline on Ctrl-C / crash), and the resource defaults applied when a task omits the corresponding runtime attribute.

Development

# The patched runtime lives in a separate repo (Fovus/miniwdl). For local dev,
# clone it under vendor/ (git-ignored) and install it before the plugin:
git clone https://github.com/Fovus/miniwdl.git vendor/miniwdl   # once
pip install ./vendor/miniwdl   # miniwdl-fovus-runtime (satisfies the runtime pin)
pip install -e ".[test]"       # the plugin
pytest                         # unit + simulated-backend integration tests

Alternatively, once miniwdl-fovus-runtime is published, pip install -e ".[test]" alone resolves the runtime from PyPI. CI and released builds always install it from the index (see the Release GitHub Actions workflow).

tests/e2e/ contains fake fovus and docker executables used to exercise the full miniwdl run integration locally without a Fovus account or real Docker.

Status / scope

v1.0.0 supports containerized Fovus jobs grouped under one pipeline per run, with the shared-storage I/O model. Out of scope for now: monolithic (license-bound) jobs, auto-provisioning the storage mount, per-task live log streaming, and miniwdl call-cache integration.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

miniwdl_fovus-1.0.2.tar.gz (35.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

miniwdl_fovus-1.0.2-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

Details for the file miniwdl_fovus-1.0.2.tar.gz.

File metadata

  • Download URL: miniwdl_fovus-1.0.2.tar.gz
  • Upload date:
  • Size: 35.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for miniwdl_fovus-1.0.2.tar.gz
Algorithm Hash digest
SHA256 af7ad03008a4afb9ba6678f9694ee79eedbd6b6c0b6cfa5f1125438da9eaee04
MD5 d04e685d5735fb4e8a4b5b6055d5909a
BLAKE2b-256 ca820fb4eadd27db2aa6a0715b2c9aedd0ce183f7711aeb4fc6a3270bb0358c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for miniwdl_fovus-1.0.2.tar.gz:

Publisher: release.yml on Fovus/miniwdl-fovus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file miniwdl_fovus-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: miniwdl_fovus-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 30.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for miniwdl_fovus-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 46bbfe302a51b4d7b60154294feb7275e0e449d66149ed247910416af81efb60
MD5 c871bbdc038b264ab3b6efbec39fea4f
BLAKE2b-256 b423dd139eda56dd72208dd36ea6eef647f5de70f7caeb4a2be414bba05f318b

See more details on using hashes here.

Provenance

The following attestation bundles were made for miniwdl_fovus-1.0.2-py3-none-any.whl:

Publisher: release.yml on Fovus/miniwdl-fovus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page