Running singularity on a proj directory


I am tying to run a software in a container. I downloaded it (xenome) using singularity. It works fine if I run it from the home directory. It also works if I run it from the proj dir, however if I submit a slurm job form the proj dir it could not read the files.

Because I have many files it could not finish all of them if I run it from the home dir because of quota limitation.

Please find attached the script file.



@salehm Some of your project files had the wrong group ownership, so it prevented you from writing files there. I fixed this. Try running the job again.

thanks @dstrong I tried again but it still giving the same message "can not open filename to read.

Please find screenshot.


Oh, I see now it’s a bind issue; your home directory is bound to the container by default but the project directory is not. Try the option singularity exec --bind /project/salehm_122.

I ran the command from both home and my proj directories but it is giving error. I guessed I need to add the software image to the command line and tried again but still giving error messages. Please find the screen shots for my attempts.

I appreciate it if you please just give me a little of more explanation where to run this line and where to incorporate the image file.

Thank you so much for your support.

Sorry, I meant add that --bind option to your existing singularity exec command in your job script.

Yes, I figured that by reading the singularity page on CARC website. But still not able to find the image. I tried the different options on the page to bind the image but none is working.

This is how the script look like after adding bind.

It should look like this:

singularity exec --cleanenv --bind /project/salehm_122 image_latest.sif xenome classify -M 100 -T 8 -v -P hg38_mm10_ens99 -i $k --output-filename-prefix "${filename}" &

That assumes the image_latest.sif file is in the same directory as the job script. If not, you could use the absolute path to this image_latest.sif file.

@dstrong Great working fine now, thank you so much for your help.