-
I would like to experiment with thebe-lite, but a strict requirement for me is to have it self-hosted, to not raise any privacy concerns (accessing external resources that might use cookies etc.). It seems there is some part of (and old version of) jupyterlab/core compiled into thebe: s=JSON.parse(i.PageConfig.getOption("litePluginSettings")||"{}")[l]||{}
o=s.pyodideUrl||"https://cdn.jsdelivr.net/pyodide/v0.23.4/full/pyodide.js" and I have not found a way to override this constant. I tried Any hints how to make it fully self-hosted (and working, because I currently have a CORS error). It seems that maybe the options are not passed to the service worker? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
FWIW, I managed to get it working, essentially by replacing the pyodide worker via
Some (pure-python?) packages still get loaded from files.pythonhosted.org, maybe I can put a simple caching proxy in-between. This is not very well-documented, and likely subject to change with jupyterlite versions. Here is a starting point: |
Beta Was this translation helpful? Give feedback.
FWIW, I managed to get it working, essentially by replacing the pyodide worker via
jupyter-config-data
:workerUrl
to the location of your "full" jupyterlite workerbaseUrl
to the root of your jupyterlite installationSome (pure-python?) packages still get loaded from files.pythonhosted.org, maybe I can put a simple caching proxy in-between.
This is not very well-documented, and likely subject to change with jupyterlite versions. Here is a starting point:
https://github.com/jupyterlite/jupyterlite/blob/0ce857b1aab8db3253d51d6a126e8cd6a0260d9d/packages/server/src/tokens.ts#L45-L48