If you are running a Nextflow workflow, you can direct processes to use containers already in CVMFS rather than downloading them. This saves both time and storage.
Nextflow runs each workflow process in its own environment. When using containers, it normally pulls the required image automatically. On BioShell, you can override this behaviour by creating a config file that points processes to the existing CVMFS images.
Note: Nextflow always prioritises a
-configfile passed on the command line over the workflow’s built-innextflow.config.
Using containers directly from CVMFS
Create a config file (e.g. cvmfs_path.config) that points a process to the container
stored in CVMFS:
process {
withName: 'FASTQC' {
container = 'file:///cvmfs/singularity.galaxyproject.org/all/fastqc:0.12.1--hdfd78af_0'
}
}
Using an installed SHPC module
Alternatively, if you have already installed a tool via Bio-Shelley or SHPC, you can reference it by module name instead of a container path:
process {
withName: 'FASTQC' {
module = 'fastqc/0.11.9'
}
}
Note: The
modulevalue must match exactly what appears inmodule avail.
Running with your config override
Pass your config file on the command line when running the workflow:
nextflow run main.nf -profile singularity -config cvmfs_path.config