Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

running more than one 'docker run' #8

Open
avilella opened this issue Aug 18, 2023 · 1 comment
Open

running more than one 'docker run' #8

avilella opened this issue Aug 18, 2023 · 1 comment

Comments

@avilella
Copy link

avilella commented Aug 18, 2023

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
Copy link
Collaborator

nchenche commented Sep 12, 2023

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:

  • download the latest docker image (lopesi2bc/surfmap:2.0.0) if it is not present on your system
  • mount the required volumes
  • run your command on the container

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants