Skip to content

Latest commit

 

History

History
56 lines (31 loc) · 2 KB

CreateBinder.md

File metadata and controls

56 lines (31 loc) · 2 KB

Share your notebooks on Binder

How to share your .NET Jupyter Notebook

If you want to share notebooks you have made using the .NET Jupyter kernel, one easy way is to generate a Binder image that anyone can run on the web.

Prerequisites:

  • A GitHub repo and at least one notebook to share
  • Dockerfile to create the Binder image

Setup instructions

The repo file structure should look something like this:

The Dockerfile will install the .NET SDK then copy the notebooks to the notebooks folder.

# Copy notebooks

COPY ./notebooks/ ${HOME}/notebooks/

RUN chown -R ${NB_UID} ${HOME}
USER ${USER}

Now push your changes to github.

Open a browser to Binder.

Enter your repository URL and branch.

Press launch to test your Binder.

During development it is useful to use a commit hash so that you can test different commits at the same time.

When you're happy with the result, expand the section to reveal the badge code, which you can embed in your blogs and posts.

Start in JupyterLab

By default, Binder will start with the Jupyter Notebook frontend. If you prefer to use JupyterLab, just add the query parameter ?urlpath=lab to the URL in your badge.

For example, change this:

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dotnet/interactive/main)

into this:

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/dotnet/interactive/main?urlpath=lab)