Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use ein (emacs ipython notebook) on remote server

I have installed and configured ein (emacs ipython notebook) to work on my local linux/mac machines. However, I would like to use ein to open ipython notebooks on a remote server and run them from within ein. Is this possible and if so could someone tell me how can this be done?

like image 255
rambalachandran Avatar asked Aug 07 '15 12:08

rambalachandran


2 Answers

M-x ein:notebooklist-open <enter>

ein prompts back with

URL or port number (default 8888):

At this point enter the full HTTP-URL of where ipython-server is running e.g.

http://192.168.1.7:8888

(On the ipython server side -- by default it runs only on localhost:8888 . You should have started it with something like:

ipython notebook --ip="*"

). For e.g. See this.

like image 151
T P Saravanan Avatar answered Sep 29 '22 00:09

T P Saravanan


I had the same issue with ein disconnecting immediately.

I solved it by creating a SSH tunnel from port 8888 on my local machine to port 8888 on the remote machine. Then, when ein asks where to connect just accept the default localhost:8888.

I then needed to, as I recall, tell the notebook server to bind on all IP addresses (not just localhost). There are some potential security concerns with that, so make sure that you've got authentication and/or a proper firewall set up.

like image 26
Derick Anderson Avatar answered Sep 29 '22 01:09

Derick Anderson