Error message "env: ‘singularity’: No such file or directory" after submitting an sbatch job script that includes Nextflow as an application. This message appears if you have set your nextflow.config file with individual SLURM parameters for each process, and some or all of the processes use Singularity containers. This also applies to any other container engines, as long as you have set SLURM parameters for each of the processes.
Get rid of
module load singularity in the batch job script.
In substitution, edit the Nextflow configuration file, normally called
nextflow.config, to load the Singularity module through Nextflow syntax:
For a more comprehensive
nextflow.config template for usage at Pawsey, see Nextflow.
On the sbatch job script, add the line
unset SBATCH_EXPORT before running Nextflow. The below is an example of submitting a job script for a Nextflow main.nf script to run: