Joss Leehan
Joss Leehan

Reputation: 25

Apptainer/Singularity Container built in local dev environment functions well, but does not work at all on cluster. How can I troubleshoot this?

I have built a singularity/apptainer container that I am trying to deploy in a cluster computing environment. The container is built by pulling from a docker image with the following command:

apptainer build --fakeroot crispresso2.sif docker://pinellolab/crispresso2

When built, this container functions perfectly in a local development environment but it produces errors (see below) when run on the cluster. The same errors occur regardless of whether the container is built in the local development environment or on the cluster.

I've tried a number of different approaches to building this container and everything has failed for one reason or another. I would like to start by figuring out why a container that works in one environment will not work in a different environment and going from there. Any input on what is going wrong here would be deeply appreciated.

Errors produced:

When run interactively:

user@cluster[]node/directory$ apptainer shell crispresso2.sif
Apptainer>CRISPResso -h

Produces:

bash: CRISPResso: command not found

When run non-interactively:

user@cluster[]node/directory$ apptainer run crispresso2_latest.sif CRISPResso -h

Produces:

Traceback (most recent call last):
  File "/CRISPResso2/CRISPResso2_router.py", line 20, in <module>
    sb.call(["CRISPResso"]+ sys.argv[2:])
  File "/usr/lib/python2.7/subprocess.py", line 172, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Upvotes: 0

Views: 106

Answers (1)

Ed-
Ed-

Reputation: 16

Are you somehow using a different shell in the cluster, with different environment variables? It seems either your PATH does not contain /opt/conda/bin (the location of CRISPResso, or CRISPResso is somehow not being put in /opt/conda/bin.

You could check which of those it is by getting an interactive session and then running echo $PATH, checking for /opt/conda/bin. If it is there, then you can simply ls /opt/conda/bin and confirm if CRISPResso is present.

I'm guessing one of those two will be the case, and that should hopefully help lead to the cause of the problem.

Upvotes: 0

Related Questions