×

nf-flyte @ 0.2.1

Provider: Union AI
Claimed: 25 Sep 2026 21:29:14 (UTC)
Description: `nf-flyte` integrates Nextflow pipelines with Flyte v2 by adding a `flyte` executor that runs each Nextflow task as a Flyte action, enabling pipeline visibility and execution within Flyte's orchestration platform. It solves the problem of running Nextflow workflows on Flyte infrastructure while preserving Nextflow's retry logic and caching, with automatic result caching based on task inputs and scripts. This plugin is used by teams wanting to execute Nextflow pipelines on Flyte infrastructure from laptops, CI systems, or within Flyte tasks themselves.
Latest version: 0.2.1
Total downloads: 583 View trends

Summary

nf-flyte runs Nextflow pipelines on Flyte v2. It adds a flyte executor that runs each Nextflow task as a Flyte action. The Nextflow head itself runs as a Flyte task, so the whole pipeline shows up as one Flyte run with one child action per task.

  • Each task runs in its own container with no extra tooling: Flyte moves the task's data. Its input files are Flyte File/Dir inputs, and its work dir comes back as a Dir output, staged by Flyte's copilot. Task pods never touch the work dir themselves.
  • Nextflow keeps retries (errorStrategy) and -resume. Flyte retries are off for task actions.
  • Flyte caches task results under a key derived from the task's script, container, inputs and bin scripts but not the Nextflow session, so a task done in one run is reused by the next.
  • A failed task shows as failed in Flyte and is never cached; Nextflow still gets its exit code, stdout and stderr.
  • Killing a task or cancelling the pipeline aborts the matching Flyte actions.
  • Nothing polls Flyte. Task actions are enqueued through the Actions service, and their state comes from its WatchForUpdates stream, which the head keeps open for the whole pipeline.

Get Started

Run Nextflow from inside a Flyte v2 task. The Flyte runtime provides the endpoint, org/project/domain, run location and API key through the task's environment. The task also needs to set NF_FLYTE_RUN_NAME (and NF_FLYTE_PARENT_ACTION when it isn't a0).

plugins {
    id 'nf-flyte@0.1.0'
}

process.executor = 'flyte'
workDir = 's3://<bucket>/<path>'

Work directory: any object store that both the Nextflow head and Flyte can read, e.g. the task's own Flyte storage (the default with flyteplugins-nextflow). S3, GCS and Azure all work, through Nextflow's nf-amazon, nf-google and nf-azure plugins.

Task containers need bash, nothing else.

Launching outside Flyte

You can also run nextflow run on a laptop or in CI. The executor then creates the Flyte run itself and prints its URL. Its root action stands for the Nextflow head:

  • Its task is named after the pipeline: the manifest name (e.g. nf-core/rnaseq), else the project it was pulled from, else the main script.
  • It ends with the pipeline's result. Stopping Nextflow (Ctrl+C, SIGTERM) aborts the run, which then shows as aborted rather than failed.
  • It fails if the head stops sending heartbeats (for example, a closed laptop or a killed CI job), which also aborts the run's remaining tasks.
flyte {
    endpoint = 'tenant.hosted.unionai.cloud'  // default: from the API key
    org = 'my-org'                            // default: from the API key
    project = 'my-project'
    domain = 'development'
    // either `export FLYTE_API_KEY=...`, or a command that prints an access token:
    // authCommand = 'my-cli print-token'
    heartbeatTimeout = '5m'                   // default: 5m
}
workDir = 's3://<bucket>/<path>'              // readable by Flyte, writable from where you run

Examples

flyte {
    queue = 'gpu'          // Flyte queue for task actions (default: the run's queue)
    pollInterval = '10s'   // fallback check of running tasks; status itself is pushed (default: 5s)
    cache = true           // cache task results in Flyte (default: true)
}

All flyte options are optional inside Flyte. Each one defaults to a value from the task's environment:

Option Default source
endpoint _U_EP_OVERRIDE
org _U_ORG_NAME
project FLYTE_INTERNAL_EXECUTION_PROJECT
domain FLYTE_INTERNAL_EXECUTION_DOMAIN
runName NF_FLYTE_RUN_NAME
parentAction NF_FLYTE_PARENT_ACTION, else a0
runOutputBase _U_RUN_BASE

The API key comes from _UNION_EAGER_API_KEY, EAGER_API_KEY or FLYTE_API_KEY. It is never read from the config file.

Process directives map to the Flyte action like this:

Nextflow Flyte
container container image (required)
cpus, memory, disk CPU / MEMORY / EPHEMERAL_STORAGE requests = limits
accelerator GPU
time task timeout

How a task runs

  1. The head renders Nextflow's usual task wrapper (.command.run), with the pod's paths, into the task dir, and writes the action's inputs.pb under the Flyte run's storage, where the Flyte UI reads it. If the run's storage isn't writable, inputs.pb goes in the task dir (.flyte/inputs.pb) instead: the task still runs, but the UI won't show its inputs.
  2. Flyte's copilot downloads every input file into the pod, keeping its name. The wrapper runs the task in a scratch dir, linking the inputs under their Nextflow stage names, and copies the declared outputs and the .command.* files to the directory copilot uploads.
  3. On success, the head copies that directory into the task dir, where Nextflow collects the outputs. On failure, the pod reports the exit code and the end of stdout/stderr through copilot's error file: Flyte fails the action (without caching it), and the head writes .exitcode, .command.out and .command.err back for Nextflow's errorStrategy.

If the pod itself dies (e.g. it's OOM-killed), the task gets the pod's exit code (e.g. 137), so exit-code-based retry rules keep working.

Caching

The Flyte cache key covers what Nextflow's task hash covers except the session: the process, its rendered script, container, environment and bin scripts, and its input files. An input produced by another task is identified by that task's key (saved in its task dir as .flyte/cache_key), so keys chain through the pipeline without reading file contents. Processes with cache false, and all tasks with flyte.cache = false, are never cached.

Plugin development

The Flyte client lives in the controller subproject (Kotlin, connect-kotlin): an informer over ActionsService/WatchForUpdates keeps every task action's state in memory, and the executor reads it from there. It is a standalone library with a documented API for any JVM language: see controller/README.md. Its protobuf and Connect code is generated at build time from the flyteidl2 protos vendored in controller/src/main/proto; refresh them with scripts/update-protos.sh <flyte tag>. Building needs JDK 21.

make assemble   # build
make test       # unit tests
make install    # install into ~/.nextflow/plugins
make release    # publish to the Nextflow registry (needs npr.apiKey in ~/.gradle/gradle.properties)

License

Apache License 2.0

Nextflow version >=25.10.0
Depends On -
Release Date 23 Oct 2026 23:33:38 (UTC)
Release Notes -
Download URL https://registry.nextflow.io/api/v1/plugins/nf-flyte/0.2.1/download/nf-flyte-0.2.1.zip
Store URL https://public.cr.seqera.io/v2/nextflow/plugin/nf-flyte/blobs/sha256:79d901195b64b63c4b26b9b4736d288215d485d4ecdea3e7a53879b03512bc7d
Size 13.3 MB
Checksum 73653231fdc62d7bc3cb30e0ac954f60e6f8b1955c4a83102b5ec54e28e1f61c20e555113c118ff1accffc2aae4e9de8cb7bfe094f1df6bb656c7367c62b8af4
Total downloads 172 View trends
Security Scan
Version Nextflow version Date Status Downloads
0.2.1 >=25.10.0 23 Oct 2026 23:33:38 (UTC) 172
0.2.0 >=25.10.0 23 Oct 2026 21:57:32 (UTC) 171
0.1.0 >=25.10.0 16 Oct 2026 00:24:56 (UTC) 240