top of page

How to set up your own JupyterLite

Note: to set up your own JupyterLite, you'll need a GitHub account. Also note that you don't need a version of JupyterLite on your own GitHub to use it, it's entirely possible to use someone else. The benefits of having your own, however, are being able to control what is and is not committed to the relevant repo. 

​

IMPORTANT!

DO NOT COMMIT ANY DATA TO GITHUB VIA JUPYTERLITE, IT IS INCREDIBLY DIFFICULT TO REMOVE ALL TRACES OF IT, AND EVEN WHEN IT CAN BE REMOVED THE STANDARD PROCEDURE WHEN THINGS ARE ACCIDENTALLY COMMITED IS TO ACT AS IF MALICIOUS ENTITIES ALREADY HAVE THE DATA.

Scroll down for the text version of the guide, click here for the video version.

jlLOGO.png

This guide goes through almost every single click I had to make to get JupyterLite setup, so hopefully it's enough to get you doing. First off, whilst logged in to your GitHub account, head to: jupyterlite/demo: JupyterLite demo deployed to GitHub Pages 🚀

and hit use this template. This will let you make a repo on your account using the same code as the demo repo.

1.png

On the dropdown that appears, click create a new repository.

3.png

On the page that pops up, choose a name for your repository, which will also be used to make the URL for it later, provide a description, set the repo to public (you can only set up JupyterLite to run from a private repo with a paid GitHub account). Also, don't click to include all branches. Finally click Create repository from template.

2.png
4.png

After this, GitHub actions built into the repo you downloaded will try and set up JupyterLite to run off of your GitHub pages, and if you've spent some time tinkering with pages before, it might work off of the bat, but I'm assuming that won't happen for most people. To see how it's going, head to actions.

In actions you'll see the workflows, these are the actions GitHub is taking for you, yellow means it's working on it, red means it's failed, green means it's worked. Colour blind options may use different colours based on choices made when setting up GitHub. Note here, mine failed, there's still some setup to do.

5.png
6.png

For the next bit of setup, head to settings.

7.png
8.png

On the page that comes up after heading to settings, on the bar on the left, click general. You might need to change the permissions GitHub actions have.

If your workflow permissions aren't set to read and write, as in the image across from this text, change it and hit save.

9.png

After this, in the same side bar as the General tab, navigate to the pages tab. Ensure that, in Build and Development your Source is set to Deploy from a branch, and your branch is set to main. You can change these by clicking the dropdowns. When you've made the changes, hit Save. Only one more step left now.

10.png

If, as in this example, you haven't configured a GitHub Pages before and set this Pages to be a subdomain of another (if you don't understand this, you probably haven't so follow this steps), you'll need to add an index.html file to the repo. To do this, head to the main page of the repo and click add file.

11.png

When you are taken to the page to add a new file, as in the image across from this one, simply type 'index.html' in the box to name the file. That's basically it, you've made your index file.

12.png

Scroll to the bottom of this page and commit the file to the main branch. When you go back to your JupyterLite repository, there should be an index.html file in the file list.

13.png

Head to actions again and check that build and deploy is now green, and that the create index.html works. Once this is done, you're done and you can visit your JupyterLite site.

14.png
15.png

To visit the site, head back to the Pages tab of settings and click Visit site. It can take up to half an hour to work so give it time. If, after this time it hasn't worked, check through these steps and check you've done them all right, and contact someone (probably Will) at D2I for some help.

16.png

When your site is done, it'll load and stay on a white page for a concerningly long time, then eventually load this page. To start coding Python, click the Python box under Notebook and it will take you to an entirely browser based implementation of Jupyter Notebooks which runs through your browser, doesn't send data anywhere, and which doesn't require a local Python install.

17.png
bottom of page