Jupyter Notebooks

Jupyter (aka IPython Notebook) is a popular tool for working with Python, R, Julia and other languages interactively. Domino hosts Notebooks (along with several other interactive tools) so you can run your notebooks on powerful hardware easily or share your notebooks with others with one click.

Table of Contents


All Domino projects are configured to be able to launch IPython Notebook sessions natively. Go to the Runs dashboard and click the “Notebook” button to launch a new Notebook session:

Domino will start Jupyter on a machine with your selected hardware and copy your project files there. When the server is ready, you’ll see a button to "Open Session":

Pro Tip: You can also ssh to the instance hosting the Jupyter notebook. See SSH Into Running Instance for more information. 

Clicking the “Open session” button will take you into the Jupyter UI. Our default Jupyter installation has kernels for Python 2.7, R, and Julia. It also supports creating Terminal sessions. We support customizations to the Jupyter installation, so you can use whatever kernels you want.


Heads up!

Notebook Sessions are like any other executing Run in Domino: they execute inside a secure, isolated environment, we bill by runtime, and any changes to the project are committed when the run completes or when you sync with Domino. 

Don’t forget to stop your sessions when you're done with them! Domino doesn’t have an easy way to detect if your Notebook session is idle, so make sure stop your sessions.

Inline Plotting

By default, we’ve configured the Notebooks to plot inline, so no extra configuration is required. Please reach out if you need to configure a different plot style.

We also support Plotly's interactive widgets, as described in our blog post.

Versions and Packages

If you need other 3rd party packages install, they can be specified as in any other run. Please see our “Dependencies” documentation for details on how to do this.

Syncing files from Jupyter Notebook to Domino

When you start your Jupyter session, Domino put all your project's files onto the server were it’s running. Frequently, though, you may want to get updated files into your Jupyter server — or you may want to get results out of the server.

Domino now makes it easy to synchronize your project files with the files on the Jupyter server. Click on the blue Domino icon on the right hand side of your screen to bring out the Sync Panel.

In the panel, click on the Sync Project Files with Session button. You have two options:

  1. A “full sync (download and upload)” will do a download, as described above — and it will also copy files from your Jupyter server up to your Domino project, where you can access them through the “Files” section of your project, download them to your computer, etc.
  2. “Download latest files to session” will copy files from your project on Domino down to the Jupyter server (but local files on the Jupyter server won’t go back up to Domino) 

Viewing Notebook files

It can take a minute to spin up a server, and in many cases, it’s important to be able to quickly get a view of what notebooks are available.

Domino now renders .ipynb files in your project directly through the web UI, so you can see the contents of a notebook without running a whole server. The image below shows what happens if you simply browse to view an ipynb file — there is no Jupyter server running here.

This lets you turn your Domino projects into a powerful notebook gallery to share with your colleagues. If someone sees a notebook they like, they can spin it up with one click on a running server. Or they can fork your project to make their own changes.

Comparison and commenting

Domino already provides powerful collaboration tools for data science work, such as comparing results between experiments and facilitating discussion. Now these features work great with ipynb files, too. For example, you can compare two different sessions you worked in and see the differences between the two versions of your notebook.

And like any other file or result, you can leave comments about notebooks, which will be shared with your colleagues.

Using notebooks for reporting

In addition to running notebooks interactively and viewing them statically, Domino lets you run notebook files as batch jobs: we’ll calculate the notebook and save the result as HTML, which we’ll host on the web so your colleagues can see it. To run a notebook as a "batch" job, you can either (a) click the "run" button next to the notebook in the files view; (b) or do a normal "domino run" command from your CLI, just specify the notebook name (e.g., "domino run foo.ipynb")

Alternatively, you can set your notebooks to run on a schedule using our Scheduled Runs feature, so your calculated, rendered notebook can be sent out as a report.


Notebook authentication
As of version 4.3, Jupyter notebooks enable token-based authentication by default, resulting in this log-in page when starting an interactive session:


While this level of security protection is recommended, notebooks running inside Domino already handle user authentication and access restrictions, making this additional step superfluous. To disable this feature, simply add the following line of commands to the pre-setup script of a custom Compute Environment, or as a RUN command inside your docker file: 

printf "\nc.NotebookApp.token = u'' \n\n" >> /home/ubuntu/.jupyter/ && chown -R ubuntu:ubuntu /home/ubuntu/.jupyter
Was this article helpful?
0 out of 0 found this helpful