Running nf-core pipelines offline
nf-core pipelines are designed to automatically fetch everything they need to run, including pipeline code, container images, and reference data. However, many high-performance computing (HPC) environments restrict internet access on compute nodes for security reasons. In such cases, you can still run nf-core pipelines by preparing all required components in advance on a system with internet access, then transferring them to your offline environment.
Offline setup
Running pipelines offline requires three main components:
- Nextflow runtime: The Nextflow workflow engine and its plugins
- Pipeline code: The nf-core pipeline itself, along with container images
- Reference data: Genome files and other reference datasets (if needed by your pipeline)
Transfer Nextflow offline
To transfer Nextflow to an offline system:
-
Install Nextflow in an online environment.
-
Run your pipeline locally.
NoteNextflow fetches the required plugins. It does not need to run to completion.
-
Copy the Nextflow binary and
$HOME/.nextflowfolder to your offline environment. -
In your Nextflow configuration file, specify each plugin (both name and version), including default plugins.
NoteThis prevents Nextflow from trying to download newer versions of plugins.
-
Add the following environment variable in your
~/.bashrcfile:.bashrc export NXF_OFFLINE='true'
Transfer pipeline code offline
To transfer pipeline code to an offline system:
-
Run
nf-core pipelines download <pipeline>in an online environment.NoteThis command will download the pipeline and configuration profiles, and packages everything into a
.tar.gzfile.TipAdd the argument
--container singularityto fetch the singularity container(s). -
Transfer the
.tar.gzfile to your offline system and unpack it.NoteThe archive contains directories called:
workflow: The pipeline filesconfig: nf-core/configs filessingularity: Singularity images (if you used--container singularity)
TipIf you are downloading directly to the offline storage (e.g., a head node with internet access whilst compute nodes are offline), use the
--singularity-cache-onlyoption fornf-core pipelines downloadand set the$NXF_SINGULARITY_CACHEDIRenvironment variable. This reduces total disk space by downloading singularity images to the$NXF_SINGULARITY_CACHEDIRfolder without copying them into the target downloaded pipeline folder.
Transfer reference genomes offline
To use nf-core reference genomes offline, download and transfer them to your offline cluster. See Reference genomes for more information.
Additional resources
For more information about running nf-core pipelines offline, see:
-
nf-core/bytesize: Running pipelines offline