Running R in Jupyter Notebooks with Docker

Docker When Github recently enabled rendering of Jupyter Notebooks they provided a compelling reason for R users try out the data document authoring power that Jupyter Notebooks provide. JupyR Screenshot

One trouble with Jupyter is that, compared to R environments like the awesome Rstudio, installation and configuration of Jupyter plus the R2py cell magics or R kernels required to run R is quite a lot greater. This nice blog post by MIke Pacer describes the non-trivial install for the Jutyper R kernel on OsX.

Docker to the Rescue

Docker allows reproducible, automated setup and exchange of complex computing environments like this. Although there are some great Docker images available for Jupyter Notebooks and for R through the Rocker project, there don't seem to be any that combine R installation with Jupyter.

I have created a simple Dockerfile that creates an image providing the Jupyter Scientific Python and tools to enable authoring notebooks with R content. The R kernel team helped out with some nbconvert rendering and MIME content issues.

In my next post I will describe some workflows for authoring and publishing Jupyter Notebooks with R content.

Many thanks to the Rocker and Jupyter teams who are doing an amazing job bringing us these expressive tools for data science!

Links

Written on June 18, 2015