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

Document requirements on Python environment to find extensions (and kernels) #116

Open
mkr opened this issue Apr 30, 2023 · 1 comment
Open
Labels
documentation Improvements or additions to documentation

Comments

@mkr
Copy link

mkr commented Apr 30, 2023

Problem

I tried to build a jupyter-lite app within an existing Ubuntu Docker build but was struggling to make any kernel available.

For example, this setup will build without the pyodide kernel:

FROM ubuntu:22.04

RUN apt-get -y update && apt-get install -y python3 python3-pip \
    && pip install --no-cache-dir --upgrade pip

RUN pip install --no-cache-dir jupyterlite-core==0.1.0 jupyterlab~=3.5.1 jupyterlite-pyodide-kernel==0.0.6 \
    && mkdir /build \
    && cd /build \
    && jupyter lite build \
    && ls -al _output/* \
    && cat _output/jupyter-lite.json

while this one will include the pyodide kernel:

FROM python:3.11

RUN pip install --no-cache-dir --upgrade pip

RUN pip install --no-cache-dir jupyterlite-core==0.1.0 jupyterlab~=3.5.1 jupyterlite-pyodide-kernel==0.0.6 \
    && mkdir /build \
    && cd /build \
    && jupyter lite build \
    && ls -al _output/* \
    && cat _output/jupyter-lite.json

Why?

Suggested Improvement

Document how the jupyter lite build process finds extensions and what the requirements for the Python environment are.

@mkr mkr added the documentation Improvements or additions to documentation label Apr 30, 2023
@jtpio
Copy link
Member

jtpio commented May 3, 2023

Thanks @mkr for the report.

There is a bit of documentation about this here: https://jupyterlite.readthedocs.io/en/latest/howto/configure/simple_extensions.html#build-the-jupyterlite-website

Basically the JupyterLite build process will find extensions and kernels located under the sys.prefix, similar to what JupyterLab does.

Maybe it could be interesting to try with pip install --user in the first example?

Also since using Docker can be quite common to build a JupyterLite site for deployment scenarios it could be interesting to provide more documentation about this (for example as a new guide) in https://jupyterlite.readthedocs.io/en/latest/howto/index.html.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants