pinellolab / CRISPResso2

Analysis of deep sequencing data for rapid and intuitive interpretation of genome editing experiments
Other
269 stars 93 forks source link

Singularity/Apptainer image constructed from docker hub file functions in local development environment but produces error on compute cluster #488

Open jleehan opened 1 week ago

jleehan commented 1 week ago

Describe the bug When I build a singularity container from the docker hub recipe file provided at docker://pinellolab/crispresso2

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

it functions correctly in a local development environment, but produces errors when run on a compute cluster.

On the cluster, when I run the container interactively:

user@cluster/directory$ apptainer shell crispresso2_latest.sif
Apptainer> CRISPResso -h

I receive the following error:

bash: CRISPResso: command not found

However, in the local development environment it produces the CRISPResso help message as expected.

On the cluster, when I attempt to execute the container non-interactively:

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

I receive the following error:

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

But again, in the local development environment it functions as expected and produces the help message.

This happens regardless of whether the container was built on the compute cluster or in the local development environment

Expected behavior I expect for the container to be able to function properly regardless of the environment in which it is situated

To reproduce N/A

Debug output N/A

Colelyman commented 1 week ago

Hi @jleehan,

Thanks for using CRISPResso and sorry to hear you are running into issues with getting it configured with Singularity. I'm not very familiar with Singularity, so I don't know how helpful I can be, but a few things stood out.

From your error log, my guess would be that the conda environment isn't being properly activated. Also, it looks like the container is using Python 2.7, so unless you are using a very old version of CRISPResso, this won't work.

Best of luck, Cole