Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use jupyterlite-xeus #19

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 29 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# repo2jupyterlite

Build jupyterlite apps out of repositories
Build JupyterLite apps out of repositories.

https://github.com/jupyterlite/repo2jupyterlite/assets/591645/3a37564f-1595-4ab6-8bba-89b8429216bf

## Installation

Expand All @@ -10,7 +12,7 @@ Install from PyPI:
pip install repo2jupyterlite
```

## Build a repo
## Build a repo with `repo2jupyterlite`

You can use the `repo2jupyterlite` command to check out any supported repo
(Git, Dataverse, Figshare, Local filestore, etc) and builds a jupyterlite
Expand All @@ -23,11 +25,11 @@ repo2jupyterlite https://github.com/yuvipanda/environment.yml requirements-build
You can serve the `requirements-build/` directory now statically, and it should
have the contents of the repo be present!

# binderlite
## binderlite

A simple web app to dynamically build and serve jupyterlite instances.
This repository also includes a simple web app to dynamically build and serve jupyterlite instances, similar to BinderHub UI.

## How to run
### How to run

1. Create a new conda env with required dependencies

Expand All @@ -46,3 +48,25 @@ A simple web app to dynamically build and serve jupyterlite instances.
```bash
uvicorn binderlite.run:app
```

## Setting up a repo

`repo2jupyterlite` and `binderlite` use `jupyterlite-xeus` to install dependencies and build the JupyterLite environment.

Dependencies are specified in a `environment.yml` file. Here is an an example:

```yaml
name: xeus-python-kernel
channels:
- https://repo.mamba.pm/emscripten-forge
- conda-forge
dependencies:
- xeus-python
- numpy
- matplotlib
- ipycanvas
```

This file defines the `xeus-python` kernel, which enables running Python code in a JupyterLite environment. It also includes some popular Python libraries like `numpy`, `matplotlib`, and `ipycanvas`, so they are directly available in the JupyterLite environment when creating a new notebook.

Check out the documentation for more information: https://jupyterlite-xeus.readthedocs.io/en/latest/environment.html
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
version="0.2",
install_requires=[
"jupyterlite-core[all]",
"jupyterlite-xeus-python",
"jupyterlite-xeus",
"jupyter-repo2docker",
"yarl",
],
Expand Down