Parente's Mindtrove

Jupyter Tidbit: Launch Notebook on Binder without leaving your browser

August 23, 2018

This post originates from a gist that supports comments, forks, and execution in binder.


Summary

You can launch a temporary Jupyter Notebook server in the cloud with any pip or conda packaged libraries preinstalled using the GitHub Gist and Binder web UIs.

  1. Visit https://gist.github.com/.
  2. Click New Gist in the top right
  3. Enter requirements.txt as the filename (or environment.yaml if you prefer conda).
  4. Add libraries you wish to use in your notebook server (e.g., pandas, altair).
  5. Click Create Public Gist.
  6. Visit https://mybinder.org/.
  7. Select Gist from the dropdown.
  8. Enter your gist username/gistid.
  9. Click Launch.

Example

When I add the requirements.txt file below to a new gist, enter parente/3675d82eae802db2c011037033d614a5 into the binder web UI, and click the launch, here's the result:

Binder

requirements.txt

altair
pandas
vega_datasets

Another Read: Jupyter Tidbit: Use nbconvert to clear notebook outputs »

nbconvert has a preprocessor that clears cell outputs from notebook files, leaving cell inputs intact.