Single kernel handling multiple projects

56 views
Skip to first unread message

Didier Amyot

unread,
Oct 17, 2017, 8:55:24 PM10/17/17
to Project Jupyter

Hi there,


I am working on building a better kernel for clojure.  I need help regarding the handling of many projects using a single kernel.  My goal is to allow users to install a single kernel that will be able to manage multiple projects that each have their own set of dependencies.


The build system for clojure is called leiningen (the command line interface is called lein) and is very similar to node’s npm.  The typical user will have many different projects each with a different set of dependencies.  I would like to be able to say to the kernel “use the dependencies in directory X”.  I expect the user to start jupyter via leiningen via a command like lein jupyter notebook which in node’s world would be equivalent to node_modules/.bin/jupyter notebook.


I know I can hack my way around using environment variables but I am wondering if there is a solution for this problem.  I believe the problem is general enough that I am sure someone somewhere thought of a solution.


cheers!


didier amyot

Roland Weber

unread,
Oct 18, 2017, 2:35:03 AM10/18/17
to Project Jupyter
Hello Didier,

the recently merged kernel discovery mechanism might be what you are looking for:

The idea is to implement kernel providers that can detect for example conda environments, Python virtual environments, or in your case Clojure projects. Your kernel provider would list every detected project as a separate kernel, but you don't have to manually create a kernel.js for every project.

Hope that helps,
  Roland

Thomas Kluyver

unread,
Oct 18, 2017, 4:05:29 AM10/18/17
to Project Jupyter
On 18 October 2017 at 08:35, Roland Weber <rolw...@de.ibm.com> wrote:
the recently merged kernel discovery mechanism might be what you are looking for:

I hope it will be, but be aware that it's a work in progress, and the Jupyter applications do not actually use this mechanism yet.

Didier Amyot

unread,
Oct 18, 2017, 7:14:10 AM10/18/17
to jup...@googlegroups.com
I believe it is exactly what I am looking for.  Many thanks!

--
You received this message because you are subscribed to a topic in the Google Groups "Project Jupyter" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jupyter/X7Fhs0C9vLs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAOvn4qjdOFNOP%2BjMr9f2DxdxgowXv_Pk_Wrctk45gNVCDMq%2BgQ%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

sp...@draves.org

unread,
Oct 18, 2017, 7:14:57 AM10/18/17
to jup...@googlegroups.com
Hi Didier, I am also looking for a good way to do that, and I don't have a definitive answer.
But one idea is a classpath magic that loads a project.clj.  Here's a plan (your input welcome): https://github.com/twosigma/beakerx/issues/5940

The alternative is to list the dependencies explicitly in the notebook.
Here's a clojure notebook that uses a more basic classpath directive (that actually works not just being an idea): https://github.com/twosigma/beakerx/blob/master/doc/contents/ClojureTutorial.ipynb

BeakerX's classpath magic also has a maven version that works with clojars.
This allows the dependencies to be explicitly listed in the notebook, which has advantages (I think that's Joe's point in the issue above).




BeakerX.com
ScottDraves.com
twitter.com/Scott_Draves

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages