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 · 6 comments
Open

Follow up on issues with Singularity #404

cjfields opened this issue Aug 16, 2024 · 6 comments

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.

@AndreaGuarracino
Copy link
Member

@cjfields would you please try with pggb v0.7.0 too?

@cjfields
Copy link
Author

cjfields commented Nov 1, 2024

@AndreaGuarracino just an update that we're still seeing this using the pggb:latest from Docker Hub, but unset -f which works.

@AndreaGuarracino
Copy link
Member

Thank you, @cjfields. By the way, I've recently updated the Debian version in the PGGB image. If you can, try the latest docker image again and 🤞

@AndreaGuarracino
Copy link
Member

docker pull ghcr.io/pangenome/pggb:202411012021194f1ba1 to be sure about what we are discussing!

@cjfields
Copy link
Author

cjfields commented Nov 4, 2024

@AndreaGuarracino unfortunately still seeing this with the new image using Singularity, the unset workaround is still fine.

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

3 participants