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

Jupyterlab 4.1.4 + Docker 20.10 incopatibility? #198

Open
Jeromekem opened this issue Mar 14, 2024 · 13 comments
Open

Jupyterlab 4.1.4 + Docker 20.10 incopatibility? #198

Jeromekem opened this issue Mar 14, 2024 · 13 comments

Comments

@Jeromekem
Copy link

Jeromekem commented Mar 14, 2024

I created a Jupyterlab container running jupyterlab & jupyter-fs

Docker version is: Docker version 20.10.21, build 20.10.21-0ubuntu1~20.04.2

Part of the Dockerfile:
FROM python:3.10.5-bullseye USER root RUN pip install jupyterlab==4.1.4 RUN pip install jupyter-fs ENTRYPOINT jupyter lab --ip='0.0.0.0' --port=8001 --no-browser --allow-root

The jupyter config file is generated before building the docker img, with:
jupyter lab --generate-config
This created jupyter_server_config.py in the .jupyter folder. Subsequently, this is added to the config:

c = get_config() #noqa c.ServerApp.contents_manager_class = "jupyterfs.metamanager.MetaManager" c.ServerApp.jpserver_extensions = { "jupyterfs.extension": True }

In the docker container the volume where the config file resides, is mounted, so jupyter server is able to read the config. Then from jupyterlab settings, this is added to the configurations of jupyter-fs. Which points to the home folder.

{ "resources": [ { "name": "root at test dir", "url": "osfs:///home/jeroen" } ] }

Unfortunately, when taking the required steps, this leaves no active file browser. Might there be a compatibility issue with jupyter-fs and the Jupyterlab/Docker versions given? If the issue is on my side, the issue will be closed.

Keen to hear.

@timkpaine
Copy link
Collaborator

You should inspect the logs for evidence of extension activation

@Jeromekem
Copy link
Author

Jeromekem commented Mar 14, 2024

I this evidence enough? If you recommend to check any other specifics, please let me know.

jupyter labextension list

/home/jeroen/.local/share/jupyter/labextensions
        @jupyter-widgets/jupyterlab-manager v5.0.9 enabled OK (python, jupyterlab_widgets)

/usr/local/share/jupyter/labextensions
        jupyterlab_pygments v0.3.0 enabled OK (python, jupyterlab_pygments)
        jupyter-fs v0.4.1 enabled OK (python, jupyter-fs)

@timkpaine
Copy link
Collaborator

That's good for the client side, also look at the server logs during startup, it should indicate it's being used

@Jeromekem
Copy link
Author

Jeromekem commented Mar 14, 2024

Thanks! Seems to be OK right? Should I maybe rebuild jupyterlab after the extension is installed in the Dockerfile? What else do you recommend to check?

jupyter server extension list provides:

Config dir: /usr/local/etc/jupyter
    jupyter_lsp enabled
    - Validating jupyter_lsp...
      jupyter_lsp 2.2.4 OK
    jupyter_server_terminals enabled
    - Validating jupyter_server_terminals...
      jupyter_server_terminals 0.5.2 OK
    jupyterfs.extension enabled
    - Validating jupyterfs.extension...
Extension package jupyterfs.extension took 0.1057s to import
      jupyterfs.extension 0.4.1 OK
    jupyterlab enabled
    - Validating jupyterlab...
      jupyterlab 4.1.4 OK
    notebook_shim enabled
    - Validating notebook_shim...
      notebook_shim  OK

Config dir: /usr/local/etc/jupyter
    jupyter_lsp enabled
    - Validating jupyter_lsp...
      jupyter_lsp 2.2.4 OK
    jupyter_server_terminals enabled
    - Validating jupyter_server_terminals...
      jupyter_server_terminals 0.5.2 OK
    jupyterfs.extension enabled
    - Validating jupyterfs.extension...
      jupyterfs.extension 0.4.1 OK
    jupyterlab enabled
    - Validating jupyterlab...
      jupyterlab 4.1.4 OK
    notebook_shim enabled
    - Validating notebook_shim...
      notebook_shim  OK

@timkpaine
Copy link
Collaborator

You've got some stuff in /usr/local and some stuff in ~/.local which is a bit weird and might be evidence of some misconfiguration. Can you look in the logs when you run jupyter lab and check for the extension actually being used (it should show in the logs).

@Jeromekem
Copy link
Author

Jeromekem commented Mar 14, 2024

[I 2024-03-14 15:12:30.678 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2024-03-14 15:12:30.678 ServerApp] jupyterfs.extension | extension was successfully linked.
[I 2024-03-14 15:12:30.682 ServerApp] jupyterlab | extension was successfully linked.
[I 2024-03-14 15:12:30.901 ServerApp] notebook_shim | extension was successfully linked.
[I 2024-03-14 15:12:30.920 ServerApp] notebook_shim | extension was successfully loaded.
[I 2024-03-14 15:12:30.921 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2024-03-14 15:12:30.922 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2024-03-14 15:12:30.922 ServerApp] Installing jupyter-fs resources handler on path /jupyterfs/resources
[I 2024-03-14 15:12:30.922 ServerApp] jupyterfs.extension | extension was successfully loaded.
[I 2024-03-14 15:12:30.924 LabApp] JupyterLab extension loaded from /usr/local/lib/python3.10/site-packages/jupyterlab
[I 2024-03-14 15:12:30.924 LabApp] JupyterLab application directory is /usr/local/share/jupyter/lab
[I 2024-03-14 15:12:30.924 LabApp] Extension Manager is 'pypi'.
[I 2024-03-14 15:12:30.934 ServerApp] jupyterlab | extension was successfully loaded.
[I 2024-03-14 15:12:30.935 ServerApp] Serving contents
[I 2024-03-14 15:12:30.935 ServerApp] Jupyter Server 2.13.0 is running at:
[I 2024-03-14 15:12:30.935 ServerApp] http://localhost:8888/lab?token=14006b25defe80c53a8d96e4f229fc54c74534a85a45f982
[I 2024-03-14 15:12:30.935 ServerApp]     http://127.0.0.1:8888/lab?token=14006b25defe80c53a8d96e4f229fc54c74534a85a45f982
[I 2024-03-14 15:12:30.935 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 2024-03-14 15:12:30.947 ServerApp] No web browser found: Error('could not locate runnable browser').
[C 2024-03-14 15:12:30.947 ServerApp] 
    
    To access the server, open this file in a browser:
        file:///home/jeroen/.local/share/jupyter/runtime/jpserver-21-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/lab?token=14006b25defe80c53a8d96e4f229fc54c74534a85a45f982
        http://127.0.0.1:8888/lab?token=14006b25defe80c53a8d96e4f229fc54c74534a85a45f982
[I 2024-03-14 15:12:30.965 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server

Extension was succesfully linked and loaded. Should there be anything else there? For what it's worth: the extension is shown in jupyterlab itself, and I can edit it's settings, but the file browsers just don't show up. Let me know what you recommend to do next

@timkpaine
Copy link
Collaborator

timkpaine commented Mar 14, 2024

Does it show up in the settings editor in the JupyterLab UI?

@Jeromekem
Copy link
Author

Ty tim, yes. See:
Screenshot 2024-03-14 at 16 16 27

@timkpaine
Copy link
Collaborator

Looks like everything is working properly from an extension standpoint. Do you see any errors in the javascript console in your browser?

@Jeromekem
Copy link
Author

Jeromekem commented Mar 14, 2024

Hopefully you will have an idea, this is what I see. Using latest version of Chrome.
Screenshot 2024-03-14 at 16 21 39

@timkpaine
Copy link
Collaborator

It looks like the tree viewer failed to render, i will try to reproduce. Thanks for providing this info!

@Jeromekem
Copy link
Author

Thanks so much Tim. I am looking forward to use the extension and please let me know if I can provide more details to help!

@Jeromekem
Copy link
Author

@timkpaine I went through the same steps with an older jupyter-fs and jupyterlab version in Docker version remains the same (Docker version 20.10.21).

RUN pip install jupyterlab==3.6.3 RUN pip install jupyter-fs==0.3.1

Here, the file-browser did open, but other errors appear. See:

Screenshot 2024-03-18 at 12 54 45

Hopefully it helps and pleased to hear back.

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

No branches or pull requests

2 participants