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

Follow up on issues with Singularity #404

Open
cjfields opened this issue Aug 16, 2024 · 1 comment
Open

Follow up on issues with Singularity #404

cjfields opened this issue Aug 16, 2024 · 1 comment

Comments

@cjfields
Copy link

This is a followup to the closed issue as noted in #291, which can be worked around using the nf-core pangenome workflow. I have separately confirmed this using the same data for the below. As noted below, this is likely due to the pggb wrapper script.

When I try to run a Docker-converted Singularity container:

$ singularity run $SINGULARITY_CACHEDIR/pggb_latest.sif pggb -i 5NM.fa -s 2000 -p 94 -n 5 -t $SLURM_NTASKS -S -m -o 5NM_2Kb94 -V 'NC_017518.1:#'
Illegal option --

The Illegal option -- is coming from the shell within the container for some reason. If I try running the latest container interactively, as follows, and check where the pggb path is:

$ singularity run $SINGULARITY_CACHEDIR/pggb_latest.sif
Singularity> which pggb
Illegal option --
Usage: /usr/bin/which [-a] args

Note the Illegal option --. What happens if I just try to invoke pggb?

Singularity> pggb
/usr/bin/env: 'bash': No such file or directory

No shell? What are we running.

Singularity> echo $0
/bin/bash

This is the path for the interactive shell if using singularity run, which doesn't match the error above when invoking pggb, so maybe it's the shebang line in the pggb script:

> pggb
/usr/bin/env: 'bash': No such file or directory

Singularity> /usr/bin/which pggb
/usr/local/bin/pggb

Singularity> head -n2 /usr/local/bin/pggb
#!/usr/bin/env bash

So there seems to be some confusion in the paths under singularity.

@kiratalreja3
Copy link

Run unset -f which command and it will fix the issue.

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