SyneRBI / SyneRBI_VM

Virtual Machine with pre-installed SyneRBI software
http://www.ccpsynerbi.ac.uk
Apache License 2.0
3 stars 7 forks source link

allow port forwarding #101

Closed paskino closed 5 years ago

paskino commented 5 years ago

Currently port forwarding from host to guest machine is disabled. If we would allow it we could run jupyter notebooks from the host and we wouldn't need to install dependencies such as firefox.

KrisThielemans commented 5 years ago

interesting! should we actually not forward the Gadgetron port as well?

I don't see why we shouldn't do this? @bathomas , @casperdcl, @evgueni-ovtchinnikov ?

Of course, this strategy should also work for the docker image, so that would be a solution for those who can install docker on their machine.

DANAJK commented 5 years ago

The install.md file mentions port forwarding for Gadgetron. (I remembered there were these instructions, but it just took me a while to find them starting from the main web page.)

paskino commented 5 years ago

I guess @evgueni-ovtchinnikov uses this to have SIRF on windows with Gadgetron in the VM

KrisThielemans commented 5 years ago

the disabled port is http,but we don't care about that. Excellent idea to add gadgetron and jupyter (8888) though.

if we add port forwarding, does that affect programs running in the VM? I don't think so, but can you check? i.e. add port forward for gadgetron, and then see if the VM-version of SIRF still works.

Then need to add a section in the doc how to start the jupyter notebook from inside the VM and how to access it from your own browser. This should be something like:

In the VM

cd $SIRF_SRC_PATH
jupyter notebook --no-browser

copy full URL and paste into your browser (on the host).

Sadly, this didn't work for me. the browser says that no-one is there.

KrisThielemans commented 5 years ago

@paskino I think you resolved this with the Ubuntu 18.04. Could you please document it here (commit and how to use it).

casperdcl commented 5 years ago

--no-browser --ip 0.0.0.0

KrisThielemans commented 5 years ago

@paskino seems you ave this in the ubuntu18.04 branch. Can you add the Gadgetron port as well, update INSTALL.md (remove the instructions on how to forward the port at the bottom, and add info on the jupyter server.

KrisThielemans commented 5 years ago

The port forwarding info is also on https://github.com/CCPPETMR/CCPPETMR_VM/wiki/Using-VM-as-a-Gadgetron-server

casperdcl commented 5 years ago

related to https://github.com/CCPPETMR/SIRF-SuperBuild/issues/216, what ports should we expose? If we map jupyter's 8888 to the host 8888 it may not work if the host already has jupyter running on that port. Maybe safest to map to something else?

KrisThielemans commented 5 years ago

@paskino enabled port forwarding for jupyter and Gadgetron, https://github.com/CCPPETMR/CCPPETMR_VM/blob/b6f5ddd0c472990dc6c35c5d9bb5da5d82f9c2af/vagrant/Vagrantfile#L36

INSTALL.md has not been updated though. I did update the wiki page but it doesn't talk about jupyter.

@casperdcl asked

what ports should we expose. If we map jupyter's 8888 to the host 8888 it may not work if the host already has jupyter running on that port.

The azure client uses 9999 which prevents that problem. Can we all use the same port?

@paskino, could you please move the text on port forwarding from INSTALL.md to a separate file, e.g. Using_VM_as_server.md. Add text on jupyter there (say this is from v2.0.0). Point the wiki page to the new file.