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

Trim packages to make expanded directory smaller to fit under Heroku limit.. #7

Open
wants to merge 3 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
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,25 @@ ENV TARGET_DIR=${GITHUB_WORKSPACE:-/github/workspace}
# Build the Jupyter lite web app, the pyodide kernel option is passed for offline availability
# (see https://jupyterlite.readthedocs.io/en/latest/howto/configure/advanced/offline.html), the
# Kernel version is taken from https://github.com/jupyterlite/pyodide-kernel/blob/main/packages/pyodide-kernel/package.json
#
# We need to trim the size of our package down, so we are explicitly deleting some default wheels
# from the resulting output. Hacky!
CMD jupyter lite build \
--config /build/jupyter_lite_config.json \
--lite-dir /build \
--no-sourcemaps \
--output-dir notebooks \
--pyodide https://github.com/pyodide/pyodide/releases/download/0.23.2/pyodide-0.23.2.tar.bz2 \
&& rm notebooks/static/pyodide/astropy-5.2* \
&& rm notebooks/static/pyodide/biopython-1.81* \
&& rm notebooks/static/pyodide/bokeh-3.1* \
&& rm notebooks/static/pyodide/Fiona-1.8* \
&& rm notebooks/static/pyodide/gdal-3.5* \
&& rm notebooks/static/pyodide/gensim* \
&& rm notebooks/static/pyodide/mne* \
&& rm notebooks/static/pyodide/mypy-1.1* \
&& rm notebooks/static/pyodide/opencv_python-4.7* \
&& rm notebooks/static/pyodide/RobotRaconteur-0.15* \
&& rm notebooks/static/pyodide/sympy-1.11* \
&& rm notebooks/static/pyodide/yt-4.1* \
&& tar -czf ${TARGET_DIR}/jupyter-lite-build.tgz notebooks
18 changes: 10 additions & 8 deletions jupyterlite/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Contents below from https://github.com/jupyterlite/demo/blob/main/requirements.txt
# Stripped out as many resources as possible to slim it down to fit in Heroku limits
# when deployed as part of Quepid.

# Core modules (mandatory)
jupyterlite-core==0.1.0
Expand All @@ -8,18 +10,18 @@ jupyterlab~=3.5.1
jupyterlite-pyodide-kernel==0.0.8

# JavaScript kernel (optional)
jupyterlite-javascript-kernel==0.1.0b21
# jupyterlite-javascript-kernel==0.1.0b21

# Language support (optional)
jupyterlab-language-pack-fr-FR
jupyterlab-language-pack-zh-CN
# jupyterlab-language-pack-fr-FR
# jupyterlab-language-pack-zh-CN

# SQLite kernel (optional)
jupyterlite-xeus-sqlite==0.2.1
#jupyterlite-xeus-sqlite==0.2.1
# P5 kernel (optional)
jupyterlite-p5-kernel==0.1.0
#jupyterlite-p5-kernel==0.1.0
# Lua kernel (optional)
jupyterlite-xeus-lua==0.3.1
# jupyterlite-xeus-lua==0.3.1

# JupyterLab: Fasta file renderer (optional)
jupyterlab-fasta>=3,<4
Expand All @@ -41,7 +43,7 @@ ipympl>=0.8.2
# Python: ipycanvas library for Jupyter notebooks (optional)
ipycanvas>=0.9.1
# Python: ipyleaflet library for Jupyter notebooks (optional)
ipyleaflet
# ipyleaflet

# Python: plotting libraries (optional)
plotly>=5,<6
Expand All @@ -50,4 +52,4 @@ bqplot

# Contents below added from https://jupyterlite.readthedocs.io/en/latest/howto/configure/advanced/offline.html

jupyterlite-core[mathjax]==0.1.0
#jupyterlite-core[mathjax]==0.1.0
Loading