Follow up on issues with Singularity
Opened this issue · 6 comments
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.
Run unset -f which
command and it will fix the issue.
@cjfields would you please try with pggb v0.7.0
too?
@AndreaGuarracino just an update that we're still seeing this using the pggb:latest
from Docker Hub, but unset -f which
works.
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 🤞
docker pull ghcr.io/pangenome/pggb:202411012021194f1ba1
to be sure about what we are discussing!
@AndreaGuarracino unfortunately still seeing this with the new image using Singularity, the unset
workaround is still fine.