jupyter notebook on compute clients (ada-X)
To run a jupyter notebook on your linux is simple just run:
jupyter notebook
But if you like to run it on our “central clients” (ada-X) you need to do a port forwarding, to have access to the notebook.
There are some requirements:
- You need to be connected to the math-guest VPN so that you have direct access to the “central clients” (https://blogs.ethz.ch/isgdmath/home-office/)
The following command will start a new jupyter notebook and open a ssh tunnel.
You need to modify the following in the command:
HOST="ada-10"
with the host you likeUSERNAME="username"
with your username to connect.
The list of hosts you can use is on the following page:
HOST="ada-10"; USERNAME="username"; PORT=$(($RANDOM % 1000 + 8000)); ssh -t $USERNAME@$HOST -L $PORT:localhost:$PORT "screen jupyter notebook --port $PORT --no-browser"
You need to keep the terminal window running otherwise the port forwarding will stop. The notebook however will still be running on the “central client”, you will just loose the connection in to the webinterface.
To be able to connect to it again, it get’s a bit tricky, you need to know on which port you have started the notebook and reopen a port forwarding to it.
This can be done with the following command (you need to modify HOST=
, USERNAME=
and PORT=
):
HOST="ada-10"; USERNAME="username"; PORT=8943; ssh $USERNAME@$HOST -L $PORT:localhost:$PORT
Posted on
in Computing