1

I've been looking into nbconvert as a possible way of programmatically executing notebooks, but it isn't clear to me that it will work with different Kernels.

I'm planning on using JupyterHub + JupyterLab for code development using a number of different kernels, but need to run the "finished" notebooks as executable scripts - are there any tools or techniques that already achieve this?

Mark
  • 816
  • 1
  • 9
  • 27
  • Which other kernels do you have in mind? Have you found anything in the documentation, either for Jupyter itself or for the kernels. I believe some kernels are developed outside of the Jupyter core. Except for one or two of the more popular ones (Javascript?) I wouldn't count such a conversion. – hpaulj Jun 29 '18 at 15:23
  • I'm not certain yet but will likely start with a few of the more popular data science languages. So certainly R and Matlab, along with the default Python. The reason I need executables is I'd like to run them at scale across potentially hundreds of cloud VMs, installing even a headless notebook seems inefficient. – Mark Jun 29 '18 at 18:52
  • And MATLAB has been installed on those cloud VMs? – hpaulj Jun 29 '18 at 18:58
  • Maybe Matlab was a bad example because of the way those files have to be packaged by Matlab to run on machines without Matlab licences. I doubt the kernel will support such a feature though I've not looked into it yet – Mark Jun 29 '18 at 19:03

1 Answers1

2

Just doing a web search for

nbconvert for R

gave me a link to:

https://www.rdocumentation.org/packages/nbconvertR/versions/1.0.2/topics/nbconvert

and for matlab

https://pypi.org/project/matlab_nbconvert/

The converters are language specific, and depend on who has developed the specific kernels.

https://nbconvert.readthedocs.io/en/latest/usage.html#convert-script

has an example of to scrip for julia. I don't know just how generic that is. You many have to test it.

hpaulj
  • 221,503
  • 14
  • 230
  • 353
  • Thanks! I don't know how I didn't come across these, I must have read hundreds of web pages this week looking for an answer. – Mark Jun 29 '18 at 19:10