jupyter-on-openshift / jupyter-notebooks

OpenShift compatible S2I builder for basic notebook images.
Apache License 2.0
54 stars 111 forks source link

minimal jupyterlab notebook cannot be rebuilt #35

Closed MichaelTiemannOSC closed 2 years ago

MichaelTiemannOSC commented 2 years ago

A project I'm working on offers the default minimal notebook via Open Data Hub. When I install extensions that require a JupyterLab re-build I get this error:

PermissionError: [Errno 1] Operation not permitted: '/opt/app-root/share/jupyter/lab/staging/index.js'

It occurs because the rebuild script attempts to do a chmod after copying a file and the 755 permissions for both this file and its containing directory do not permit my notebooks's UID (1000640000) to perform that operation. Here are some more details:

PermissionError: [Errno 1] Operation not permitted: '/opt/app-root/share/jupyter/lab/staging/index.js'
See the log file for details:  /tmp/jupyterlab-debug-ibq4afxo.log
(base) bash-4.4$ jupyter --paths
config:
    /opt/app-root/src/.jupyter
    /opt/app-root/miniconda3/etc/jupyter
    /usr/local/etc/jupyter
    /etc/jupyter
data:
    /opt/app-root/src/.local/share/jupyter
    /opt/app-root/miniconda3/share/jupyter
    /usr/local/share/jupyter
    /usr/share/jupyter
runtime:
    /opt/app-root/src/.local/share/jupyter/runtime

The log file:

(base) bash-4.4$ cat /tmp/jupyterlab-debug-ibq4afxo.log
[LabBuildApp] Building in /opt/app-root/share/jupyter/lab
[LabBuildApp] Node v14.16.1

[LabBuildApp] Yarn configuration loaded.
[LabBuildApp] Building jupyterlab assets (production, minimized)
[LabBuildApp] Traceback (most recent call last):

[LabBuildApp]   File "/opt/app-root/lib64/python3.8/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
    yield

[LabBuildApp]   File "/opt/app-root/lib64/python3.8/site-packages/jupyterlab/labapp.py", line 166, in start
    raise e

[LabBuildApp]   File "/opt/app-root/lib64/python3.8/site-packages/jupyterlab/labapp.py", line 162, in start
    build(name=self.name, version=self.version,

[LabBuildApp]   File "/opt/app-root/lib64/python3.8/site-packages/jupyterlab/commands.py", line 469, in build
    return handler.build(name=name, version=version, static_url=static_url,

[LabBuildApp]   File "/opt/app-root/lib64/python3.8/site-packages/jupyterlab/commands.py", line 657, in build
    self._populate_staging(

[LabBuildApp]   File "/opt/app-root/lib64/python3.8/site-packages/jupyterlab/commands.py", line 1172, in _populate_staging
    shutil.copy(pjoin(HERE, 'staging', fname), target)

[LabBuildApp]   File "/usr/lib64/python3.8/shutil.py", line 416, in copy
    copymode(src, dst, follow_symlinks=follow_symlinks)

[LabBuildApp]   File "/usr/lib64/python3.8/shutil.py", line 305, in copymode
    chmod_func(dst, stat.S_IMODE(st.st_mode))

[LabBuildApp] PermissionError: [Errno 1] Operation not permitted: '/opt/app-root/share/jupyter/lab/staging/index.js'

[LabBuildApp] Exiting application: JupyterLab
GrahamDumpleton commented 2 years ago

You will need to ask Red Hat. Open Data Hub is their product and they have their own Jupyter notebook images for working with it. This project here is no longer maintained.

MichaelTiemannOSC commented 2 years ago

Noted. We are making good progress here: https://github.com/os-climate/os_c_data_commons/issues/67