cerebis / qc3C

Reference-free quality assessment for Hi-C sequencing data
GNU Affero General Public License v3.0
13 stars 1 forks source link

qc3c missing from path when run via singularity #44

Closed koadman closed 3 years ago

koadman commented 3 years ago

It seems that, at least on some systems, the path which contains qc3C is either not visible or not in $PATH when attempting to run the docker container via singularity:

singularity exec docker://cerebis/qc3c qc3c
INFO:    Using cached SIF image
FATAL:   "qc3c": executable file not found in $PATH

Is it possible that the host system's filesystem overlay has masked it?

cerebis commented 3 years ago

qc3C relies on its Conda packaging to create a very simple Dockerfile, with an entrypoint defined as qc3C. Therefore the docker image functions like an executable with run.

It happens that the base Docker image is miniconda3, which installs the conda system on the path /opt/conda.

The installation of singularity on the UTS HPC is using default hostfs mounting, which although handy, happens to mask the container's /opt with its own.

You must prevent host fs mounting. Reading the documentation for Singularity v3.7, I would have thought--no-mount /opt would have been the simplest solution, but it does not seem to take effect. Therefore, instead use the more thorough --contain option. However, now because none of the host fs accessible by default, you must specify a bind mount to access your analysis files.

As an example, to analyse files found in your current working directory using bam mode.

# just for the sake of completeness, we build the image first
singularity build qc3C.sif docker://cerebis/qc3c
# now run the analysis, where our files are all in $PWD
singularity --contain --bind $PWD qc3C.sif bam -e DpnII --fasta reference.fna.gz --bam hic2ref.bam