From Docker to singularity

381 views
Skip to first unread message

Hasnae Ag

unread,
Feb 10, 2022, 4:58:06 PM2/10/22
to singularity
Dear singularity users,
I have a path error in a docker with windows, also with singularity under cluster HPC; the error is  (FATAL:   "ENTRYPOINT": executable file not found in $PATH).

I have an issue with how to replace arguments of Docker into singularity container.

And what is the equivalence of entrypoint in singularity?
Example:
For the conversion of Docker command into Singularity command, I used this :
The Docker command:  
"docker run -it --rm --name qmtraffic  -v "${PWD}"/inputs:/qmtools/inputs:ro  -v "${PWD}"/reports:/qmtools/reports --entrypoint qmtraffic ${IMG} "
The Singularity command :
"singularity exec\
--cleanenv \
--bind ${DATA_DIRECTORY}:/data --bind ${OUTPUT_DIRECTORY}:/out \
${qmtools_SINGULARITY_IMG} \
--ENTRYPOINT [ "/home/qmtraffic.sh" ]"

Thanks in advance,
Hasnae 

v

unread,
Feb 10, 2022, 5:10:59 PM2/10/22
to singularity
Singularity doesn't have an entrypoint argument so you'd just target the script directly with exec:

singularity exec <options> <container> <command>

singularity exec --cleanenv --bind ${DATA_DIRECTORY}:/data --bind ${OUTPUT_DIRECTORY}:/out  ${qmtools_SINGULARITY_IMG} /home/qmtraffic.sh"

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.
To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/singularity/982a1443-ebdb-4e24-b5f1-947bf5056905n%40lbl.gov.

Hasnae Ag

unread,
Feb 10, 2022, 5:21:10 PM2/10/22
to singu...@lbl.gov
Thanks, I will try it.

I have another issue of how to convert of arguments,  for example for Docker qmtraffic has the follow arguments:(qmtraffic [-h] [-v] [-r REPORT_DIR] {bold,T1w,T2w} group_file), 
so, how to convert them to command for singularity container? 

Thanks,
Hasnae


v

unread,
Feb 10, 2022, 5:28:36 PM2/10/22
to singularity
If "qmtraffic" is the entrypoint, then you can just add additional flags to it. That last bit of the Singularity exec (after the container) is like if you were running the executable on the command line.

Hasnae Ag

unread,
Feb 11, 2022, 9:19:39 AM2/11/22
to singu...@lbl.gov
Ok, thanks, I will retry. 

Hasnae AGOURAM

Reply all
Reply to author
Forward
0 new messages