[IPython-dev] Kernels, located on the remote machines, in ipython-notebook

Matthias Bussonnier bussonniermatthias at gmail.com
Thu Mar 26 11:32:05 EDT 2015


Le 26 mars 2015 à 07:43, Ruslan Korniichuk <paad.ruslan.korniichuk at gmail.com> a écrit :

> Hi all,
> I'm trying to solve the task of adding the kernel, located on a remote machine, on the menu Kernel->Change kernel of the Jupyter (IPython) Notebook for scientific needs. The visual example HERE: http://goo.gl/pA3QRG
> Otherwise it can be named as $ ipython notebook --existing.

--existing will not work with notebook.

> I know that can to add the kernel, located on a local machine, on this menu, for example, like this:
>     1. Create the folder for kernels:
>         /home/user-ruslan/.ipython/kernels
>     2. Inside the previous folder, create the folder for Python 3 kernel:
>         /home/user-ruslan/.ipython/kernels/python3
>     3. In the /home/user-ruslan/.ipython/kernels/python3 folder, create the JSON file: 
>     {
>         "display_name": "Python 3", 
>         "language": "python", 
>         "argv": [
>         "python3", 
>         "-c", 
>         "from IPython.kernel.zmq.kernelapp import main; main()", 
>         "-f", 
>         "{connection_file}"
>         ],
>         "codemirror_mode": {
>         "version": 2, 
>         "name": "ipython"
>         }
>     }
> But in my task, probably, need to run a kernel on a remote server via SSH, and after this step copy a kernel-????.json file using scp. Likewise, in IPython for parallel computing (starting the IPython controller and engines in SSH mode).

I would replace argv [.....]  by a call to a bash script that does all what is needed. SSH, copy file etc. 
You might  need to have a little bit involved script than usual kernel.

> Critically important that the functional of addition the kernels, located on the remote machines MUST work after the Jupyter (IPython) Notebook update. Therefore, I must ask you:
> Does this not contradict to the philosophy and the way of the Jupyter (IPython) project? For this definition, this task is OK: "IPython is a tool for managing the entire lifecycle of a scientific idea":)

We do our best. The "still working after upgrade" is tricky. 
Is this a long running computation ?

I can see the need, but I'm not sure it is easy to have kernels that can run and reconnect after full and large scale IPython upgrade, if message spec changes. 

Right now, you should be able to shutdown and restart the server, nothing technically prevent it to reconnect to kernels. 
We just enforce them to shut-down. 

> In addition, please answer why the Jupyter (IPython) Notebook, necessarily, MUST run kernel when starts (no empty ipython-notebook w/o own kernel)?

This is a technical limitation for now. Notebook without kernels make sens. We "just" need to implement them. 
(With "Just" being a few month of work full time) 

> Who can help me find good algorithm for this task?
> My skype: ruslan.korniichuk
> ---
> Best regards,
> Ruslan Korniichuk
> <kernels_550px.png>_______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20150326/5e1c40bb/attachment.html>

More information about the IPython-dev mailing list