rocker-org / rocker-versioned2

Run current & prior versions of R using docker. rocker/r-ver, rocker/rstudio, rocker/shiny, rocker/tidyverse, and so on.
https://rocker-project.org
GNU General Public License v2.0
419 stars 181 forks source link

Jupyter Lab broken for binder images after upgrade to Ubuntu 22.04 / python 3.10 #728

Closed mdehollander closed 1 year ago

mdehollander commented 1 year ago

Container image name

rocker/binder:4.3.2

Container image digest

sha256:e6559b33f732059bd07706fe20e425677e01a765c4881af7bdbe7c123035e79c

What operating system are you seeing the problem on?

Linux

System information

Bug description

The binder images do not launch Jupyter Lab anymore since they are based on Ubuntu 22.04. Those images have python 3.10 and the previous images with ubuntu 20.04 and python 3.8 worked.

Images with tags 4.2.0, 4.2.1 and 4.1.3 work ok.

How to reproduce this bug?

$ apptainer shell binder_4.3.2.sif 
Apptainer> jupyter lab
Traceback (most recent call last):
  File "/usr/local/bin/jupyter-lab", line 5, in <module>
    from jupyterlab.labapp import main
  File "/usr/local/lib/python3.10/dist-packages/jupyterlab/__init__.py", line 8, in <module>
    from .handlers.announcements import (
  File "/usr/local/lib/python3.10/dist-packages/jupyterlab/handlers/announcements.py", line 14, in <module>
    from jupyter_server.base.handlers import APIHandler
  File "/usr/local/lib/python3.10/dist-packages/jupyter_server/base/handlers.py", line 24, in <module>
    from jupyter_events import EventLogger
  File "/usr/local/lib/python3.10/dist-packages/jupyter_events/__init__.py", line 3, in <module>
    from .logger import EVENTS_METADATA_VERSION, EventLogger
  File "/usr/local/lib/python3.10/dist-packages/jupyter_events/logger.py", line 19, in <module>
    from .schema import SchemaType
  File "/usr/local/lib/python3.10/dist-packages/jupyter_events/schema.py", line 9, in <module>
    from referencing import Registry
  File "/usr/local/lib/python3.10/dist-packages/referencing/__init__.py", line 4, in <module>
    from referencing._core import Anchor, Registry, Resource, Specification
  File "/usr/local/lib/python3.10/dist-packages/referencing/_core.py", line 29, in <module>
    class Specification(Generic[D]):
  File "/usr/local/lib/python3.10/dist-packages/referencing/_core.py", line 55, in Specification
    ] = field(alias="anchors_in")
TypeError: field() got an unexpected keyword argument 'alias'
eitsupi commented 1 year ago

I can't repoduce this with docker. Do you think this is a bug of apptainer?

mdehollander commented 1 year ago

Good to know it works with docker. I will give that a try as well and compare. I can not think of why it would be different, but we will see.

mdehollander commented 1 year ago

It seems to be specific to the apptainer installation on our HPC. With apptainer locally it works fine I found out. And Docker works off course as well.

Docker works like this:

docker run --rm -ti -p 8888:8888 docker.io/rocker/binder:4.3.2
...
[I 2023-11-17 10:51:12.412 ServerApp] Jupyter Server 2.9.1 is running at:
...

Where apptainer on the HPC results in an error:

apptainer run docker://docker.io/rocker/binder:4.3.2
....
  File "/usr/local/lib/python3.10/dist-packages/referencing/_core.py", line 55, in Specification
    ] = field(alias="anchors_in")
TypeError: field() got an unexpected keyword argument 'alias'

Apptainer with 4.2.1 works:

apptainer run docker://docker.io/rocker/binder:4.2.1
...
[I 2023-11-17 11:08:12.855 ServerApp] Jupyter Server 2.9.1 is running at:
...
mdehollander commented 1 year ago

I've got it also working on the HPC. After renaming my ~/.local folder things started working again. Something in there was conflicting, I guess python related.