i2bc / SURFMAP

Other
20 stars 3 forks source link

running more than one 'docker run' #8

Open avilella opened 10 months ago

avilella commented 10 months ago

Should I be able to run more than one 'docker run' command concurrently within the same Linux host without clashes in the temporary files? Do I need to do any trickery with the --volume mount points otherwise?

E.g. I am currently running with something like this:

docker run --tty --rm --volume /my/dir:/input/:rw --volume /my/dir:/ouput:/:rw \
nchenche/surfmap:v0.2 \
-pdb /input/foo.pdb -tomap stickiness -res /input/res.txt -d /output/foo/bar

Should I be adding /tmp/subfolder mounts like below so that there is no clashing between concurrent runs?

docker run --tty --rm --volume /my/dir:/input/:rw --volume /my/dir:/ouput:/:rw \
--volume /tmp/$RANDOM:/tmp/:rw \
nchenche/surfmap:v0.2 \
-pdb /input/foo.pdb -tomap stickiness -res /input/res.txt -d /output/foo/bar

Thanks in advance

nchenche commented 10 months ago

Dear avilella,

First of all, sorry for the responding time...

Next, I see that you are using an old version of surfmap, so i advise to update to the last one (see the install process here). In this last updated version, you can run surfmap using its latest docker image by simply adding --docker in your command line ; for instance:

surfmap -pdb foo.pdb -tomap stickiness --docker

This will automatically:

Finally, to answer your question, as multiple containers of a same image are independent, you should be able to run surfmap concurrently without any conflict. However, if you are facing some conflicts, just ensure you set different output directories with -d.

Hope this will help.