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

Extensions installed via pip not visible in "host" Jupyter #22

Open
kopp opened this issue Aug 23, 2021 · 1 comment
Open

Extensions installed via pip not visible in "host" Jupyter #22

kopp opened this issue Aug 23, 2021 · 1 comment
Labels
✨ enhancement New feature or request

Comments

@kopp
Copy link

kopp commented Aug 23, 2021

I love the idea to simply use a process in a docker container as kernel.
I see an issue, though:
When you run pip within this kernel, you install stuff in the docker container, right?

Some pip packages come with jupyter extensions.
If you install them in the virtual environment within the container, the jupyter instance running "outside" has no access to those.

If I install stuff via ! pip in jupyterlab and run docker diff on the container running my kernel, I see that stuff was installed to e.g.

/usr/local/lib/python3.7/site-packages/
/usr/local/etc/jupyter/nbconfig/notebook.d/widgetsnbextension.json
/usr/local/share/jupyter/labextensions/@jupyter-widgets/jupyterlab-manager/schemas/@jupyter-widgets/jupyterlab-manager/plugin.json

(all in the container).

As far as I understand, I can supply additional directories, where jupyter lab searches for extensions.
The documentation mentions JUPYTER_CONFIG_PATH and JUPYTER_PATH.

The proposal would be:
If we mount a directory on the host as volume in the container running the kernel and then modify the environmental variables (or modify the paths by some other configuration setting), then jupyter should get access to the thus installed extensions.

@MrMino
Copy link
Owner

MrMino commented Aug 31, 2021

mount a directory on the host as volume in the container running the kernel and then modify the environmental variables

Yup. Seems reasonable. But, unfortunately, it will have to wait, as my attention is currently directed at other projects, namely IPython (I want to ensure v8.0 happens sooner), and wheelfile (commitment related to my employment).

After I get back to dockernel, and fix the high-prios, I'll make this happen. But if you wish to PR this up, I might find the time to release it earlier.

@MrMino MrMino added the ✨ enhancement New feature or request label Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants