flyteplugins-nextflow
Run Nextflow pipelines on Flyte.
The Nextflow head runs inside a Flyte task. The nf-flyte Nextflow plugin runs every Nextflow task as a child action of that task. A pipeline therefore shows up in Flyte as one run with one action per Nextflow task:
- Each process runs in its own
container, with itscpus,memory,disk,acceleratorandtimedirectives. The image only needsbash: Flyte stages the task's files. - Nextflow keeps its own retries (
errorStrategy) and-resume; Flyte caches task results across runs. - Aborting the Flyte run aborts the pipeline and its running tasks.
Installation
pip install flyteplugins-nextflow
Quick start
import flyte
from flyte.io import Dir
from flyteplugins.nextflow import nextflow_image, run_nextflow
env = flyte.TaskEnvironment(name="nextflow", image=nextflow_image())
@env.task
async def demo() -> Dir:
return await run_nextflow("nf-core/demo", revision="1.2.0", profile="test", outdir="results")
run_nextflow accepts:
| Argument | Description |
|---|---|
pipeline |
Repository (nf-core/rnaseq), URL or path to run. |
revision |
Git tag, branch or commit (-r). |
profile |
Config profiles (-profile). |
params |
Pipeline parameters, passed as a params file. |
outdir |
--outdir. A relative path goes under the task's raw data prefix. The directory is returned as a Dir. |
work_dir |
Work directory. Default: nextflow-work under the task's raw data prefix. |
config |
Extra Nextflow config, as a file path or config text. |
resume |
Resume the previous run that used the same work_dir. |
report |
Render Nextflow's execution report, timeline and DAG into the task's Flyte report. The task must be declared with report=True. |
extra_args |
Any other nextflow run arguments. |
If Nextflow fails, run_nextflow raises a NextflowError containing the end of the
Nextflow output and the end of .nextflow.log.
Resume
Nextflow's resume state lives in the work directory, not in the task pod:
- the task cache (the cloud cache on object stores,
.nextflowlocally) - a session ID derived from the work directory
This has two effects:
-
Retries resume automatically. The default work directory is shared by all attempts of a task, so a retried task passes
-resumeand picks up where the failed attempt stopped. -
Resuming across runs needs a fixed
work_dir. Pass the samework_dirto each run, andresume=Truefrom the second run on:await run_nextflow("nf-core/rnaseq", work_dir="s3://my-bucket/rnaseq-work", resume=True)
Local runs
When the task runs locally (flyte run --local), Nextflow uses its own executors instead
of nf-flyte: local by default, or whatever profile or config selects, such as docker.
This needs nextflow on the PATH.
Image
nextflow_image() builds the image for the task that runs the Nextflow head. It contains
a JRE, Nextflow (nextflow_version, default 25.10.6), the nf-flyte plugin and
flyteplugins-nextflow itself. To use a
locally built plugin, pass its zip:
from pathlib import Path
image = nextflow_image(nf_flyte=Path("~/nf-flyte/build/distributions/nf-flyte-0.2.1.zip").expanduser())
Requirements
- Flyte v2. On a cluster, the work directory must be on an object store Flyte can read (S3, GCS or Azure); the default, under the task's raw data prefix, always is.
- Every process container needs
bash.
Metadata
Release files for flyteplugins-nextflow 2.12.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flyteplugins_nextflow-2.12.2-py3-none-any.whl | Python 3 | none | any | Details for flyteplugins_nextflow-2.12.2-py3-none-any.whl |
Release files / flyteplugins_nextflow-2.12.2-py3-none-any.whl
| Download URL | flyteplugins_nextflow-2.12.2-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
71431049bd41bfd8879bb803136ad2c5769a092c018f0e0a465517fca96d0a02
|
|
BLAKE2b-256 checksum How to use checksums |
a3d5ee9346aeb87f8e62497f758765e98b2ba0551206dcc19d4de58394808879
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.17
|
Security for flyteplugins-nextflow 2.12.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.