×

nf-flyte @ 0.2.0

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: 592 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.

License

Apache License 2.0

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