Donnerstag, 22. Juni 2017
Run a jupyter notebook on a compute-cluster, use it locally
For those of you who want to run a jupyter-notebook on a cluster-server, so that you can run large processes or submit cluster-jobs directly from within the notebook:
- start a shell
- type "ssh -N -f -L localhost:8888:localhost:8889 urusrname@hpc002" to open a "tunnel" between the server and your computer
don't worry if you don't see anything. The tunnel is there, it's just invisible (magic).
- then, in the same shell type "ssh urusrname@hpc002" to login to the same server
- now start a jupyter-notebook, but without opening it in the browser. Instead make it use the tunnel "jupyter-notebook --no-browser --port=8889"
You get an output like this:
" Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8889/?token=e76a6b5e3b22d1ae1cc985be277c2d81e120faf10fa0014a
"
Open a browser and copy paste the link into the browser. Exchange localhost:8889 by localhost:8888
Voila.
Inspired by
https://coderwall.com/p/ohk6cg/remote-access-to-ipython-notebooks-via-ssh
Labels:
cluster,
hpc,
jupyter-notebook,
port forwarding,
python,
ssh
Abonnieren
Kommentare zum Post (Atom)
Keine Kommentare:
Kommentar veröffentlichen