ProtProtocols / IsoProt

Protocol of the analysis of iTRAQ/TMT proteomics data including quantification, statistical analysis and maybe clustering
https://protprotocols.github.io
11 stars 4 forks source link

Automatics mount of data and OUT folders #37

Closed veitveit closed 6 years ago

veitveit commented 6 years ago

Built on the script run.sh, implement bash and batch files that

Most of this is already working in run.sh.

jgriss commented 6 years ago

@veitveit

1.) Currently, the run.sh script is failing on Ubuntu (and most other distros) since the docker command is not launched as root using a sudo command.

2.) The launching of docker and the opening of the browser currently lead to a suboptimal user experience since in my setup, the browser opens an error page (since docker hasn't been started yet) and the docker command needs the root password as input (when launched with sudo) which the user doesn't see since the console window is blocked by the browser. I'll try to find a more elegant solution to this.

3.) I don't quite understand the mounting ideas. The link you added in the dockerfile will be broken since if the script mounts the current directory to /data the link to /data/OUT will not work. I think that auto-mounting the /data directory is a very good idea. If you want to keep the /home/biodocker/OUT path I can try to build this into the bash script.

jgriss commented 6 years ago

Hi @veitveit

I've now tried to add some of these features to run.sh (51db9179743b3c943b2d4d6d9238effd5fe9add5)

Main changes are: 1) Fixed a bug that prevented the next port to be found 2) Ask for root permissions before launching docker 3) Launch browser 10 seconds after launching the docker command

Still TODO is to fix the mounting issue. One simple approach would be to create the OUT directory in the run.sh script in case it doesn't yet exist. Then, the internal link will be working and we don't have to change anything. I've now added this behaviour in a7ddb26166671ba37ba25a5f82c0bc8e29df76f5

veitveit commented 6 years ago

Great, @jgriss!

P.S. I am completely innocent when it comes to run.sh :-)

2018-07-11 11:58 GMT+02:00 Johannes Griss notifications@github.com:

Hi @veitveit https://github.com/veitveit

I've now tried to add some of these features to run.sh (51db917 https://github.com/ProtProtocols/IsoLabeledProtocol/commit/51db9179743b3c943b2d4d6d9238effd5fe9add5 )

Main changes are:

  1. Fixed a bug that prevented the next port to be found
  2. Ask for root permissions before launching docker
  3. Launch browser 10 seconds after launching the docker command

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ProtProtocols/IsoLabeledProtocol/issues/37#issuecomment-404113953, or mute the thread https://github.com/notifications/unsubscribe-auth/APEZhXtGjPw2q8ggABMOufpHd31Bd_8eks5uFcwqgaJpZM4VJuoN .

-- |||/ (o o) ----ooO-(_)-Ooo----

Don't worry about life; you're not going to survive it anyway.

http://computproteomics.bmb.sdu.dk

jgriss commented 6 years ago

Hi @veitveit,

I've now adapted run.sh to

1) test whether docker is installed 2) test whether the docker image is available. If it is not available, the user is asked whether to install it right away. 3) test whether the user is part of the docker group, and if yes, launches docker without sudo 4) mount the OUT directory in the current working directory to /home/biodocker/OUT

Could you please test whether this is working in your setup as well?

Thanks a lot!

Johannes

veitveit commented 6 years ago

Nice! I removed a sudo and it works well now!

In order to have a script for Windows as well, it would be perfect to have the same functionality in a batch file.

@gvinterhalter could you take a look?

gvinterhalter commented 6 years ago

@jgriss I think 3 seconds are sufficient, 10 seconds is way too long.

When I get the time I will try to go around this issue. Maybe with a verry simple web page.

@veitveit You mean can I make a batch script? I won't be present for the next 7 to 8 days. Otherwise the script works at my end

veitveit commented 6 years ago

@gvinterhalter Yes, please create a batch file with such functionality. No need for having it working within the next week.

jgriss commented 6 years ago

@veitveit @gvinterhalter I've now changed the delay to 3 sec in run.sh

Since @gvinterhalter created a new issue for the windows script, I guess this issue can be closed?