Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Something missing in singularity container #25

Open
mfreidin1975 opened this issue Jun 29, 2022 · 1 comment
Open

Something missing in singularity container #25

mfreidin1975 opened this issue Jun 29, 2022 · 1 comment

Comments

@mfreidin1975
Copy link

mfreidin1975 commented Jun 29, 2022

Hi Alessia,

Here is the command I run

nextflow run YAMP/YAMP.nf
--reads1 /scratch/microb/xyz_1.fastq.gz
--reads2 /scratch/microb/xyz_2.fastq.gz
--prefix XYZ
--mode QC -profile base,singularity

And this is the error I face

Error executing process > 'quality_assessment (XYZ)'

Caused by:
Process quality_assessment (XYZ) terminated with an error exit status (1)

Command executed:

fastqc -q SRR13350704_1.fastq.gz SRR13350704_2.fastq.gz

Command exit status:
1

Command output:
(empty)

Command error:
WARNING: Skipping mount /var/lib/singularity/mnt/session/etc/resolv.conf [files]: /etc/resolv.conf doesn't exist in container
/bin/bash: line 0: cd: /scratch/users/k1471250/work/9d/45759087de2ad752480ba58e000320: No such file or directory
/bin/bash: .command.sh: No such file or directory

Work dir:
/scratch/users/k1471250/work/9d/45759087de2ad752480ba58e000320

Tip: view the complete command output by changing to the process work dir and entering the command cat .command.out

It was not an issue before, when we used other HPC .

Thanks,

Max

@vshanka23
Copy link

vshanka23 commented Aug 23, 2023

Hi Max,

I had the same issue. The way to fix it is to replace the singularity parameter block with the following in your nextflow.config.

singularity {
  singularity.enabled = true
  singularity.engineOptions = '--debug'
  singularity.autoMounts = true
 }

A brief explanation: Singularity lets you create and mount paths that do not exist within the container but nextflow does not by default let user-specific host paths to be mounted within. In order to do this, we need to add the additional autoMounts flag to let Singularity know to mount user-specific host paths. This issue only occurs if the Singularity image doesn't contain a directory path that exists in the host. For example, on our HPC architecture, we have NFSes mounted on /data but /data doesn't exist within the images for YAMP. One important caveat, the installation for Singularity must have the user bind control feature enabled within the Singularity config file for this to work. Fortunately, I am the sysadmin for our cluster and I had complied Singularity with this flag enabled during installation. It is easy to turn it on, assuming your sysadmin is willing. engineOptions is simply there to provide more verbose logs from Singularity and feed to nextflow.

Vijay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants