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

v1.1.1/2 build fails with jupyter-widgets (Docker) #7180

Closed
hiramf opened this issue Sep 9, 2019 · 7 comments
Closed

v1.1.1/2 build fails with jupyter-widgets (Docker) #7180

hiramf opened this issue Sep 9, 2019 · 7 comments
Labels
status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Milestone

Comments

@hiramf
Copy link

hiramf commented Sep 9, 2019

Description

When installing version 1.1.1 or 1.1.2, there is a request to build for ipywidgets, but it fails (and takes forever). Adding a RUN jupyter lab build fails, but it works if you run it inside the container after it starts up.

The difference that stands out is the line for Building jupyterlab assets:
(build:prod:minimize) in docker fails, but (build:dev) works when you run after starting the server.

Reproduce

Here is my Dockerfile, which comes from the official Jupyter datascience-notebook image:

# Jupyter docker image
FROM jupyter/datascience-notebook

RUN conda install -c conda-forge jupyterlab=1.1.2
RUN jupyter lab build

USER $NB_UID

And here are the logs:

[LabBuildApp] Building in /opt/conda/share/jupyter/lab
[LabBuildApp] Node v11.14.0

[LabBuildApp] Building jupyterlab assets (build:prod:minimize)
[LabBuildApp] > node /opt/conda/lib/python3.7/site-packages/jupyterlab/staging/yarn.js install --non-interactive
[LabBuildApp] yarn install v1.15.2
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
[5/5] Building fresh packages...
success Saved lockfile.
Done in 27.84s.

[LabBuildApp] > node /opt/conda/lib/python3.7/site-packages/jupyterlab/staging/yarn.js yarn-deduplicate -s fewer
[LabBuildApp] yarn run v1.15.2
$ /opt/conda/share/jupyter/lab/staging/node_modules/.bin/yarn-deduplicate -s fewer
Done in 0.87s.

[LabBuildApp] > node /opt/conda/lib/python3.7/site-packages/jupyterlab/staging/yarn.js run build:prod:minimize
[LabBuildApp] yarn run v1.15.2
$ cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --config webpack.prod.minimize.config.js
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

[LabBuildApp] JupyterLab failed to build
[LabBuildApp] Traceback (most recent call last):

[LabBuildApp]   File "/opt/conda/lib/python3.7/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
    yield

[LabBuildApp]   File "/opt/conda/lib/python3.7/site-packages/jupyterlab/labapp.py", line 96, in start
    core_config=self.core_config)

[LabBuildApp]   File "/opt/conda/lib/python3.7/site-packages/jupyterlab/commands.py", line 378, in build
    command=command, clean_staging=clean_staging)

[LabBuildApp]   File "/opt/conda/lib/python3.7/site-packages/jupyterlab/commands.py", line 583, in build
    raise RuntimeError(msg)

[LabBuildApp] RuntimeError: JupyterLab failed to build

[LabBuildApp] Exiting application: JupyterLab
@jasongrout
Copy link
Contributor

Thanks. Who publishes that docker image? What is currently in it? Do they know about this issue?

@hiramf
Copy link
Author

hiramf commented Sep 9, 2019

Thanks. Who publishes that docker image? What is currently in it? Do they know about this issue?

Looks like it's made by Jupyter itself.

Added a link in my description, but here's the repo:
https://github.com/jupyter/docker-stacks

@jasongrout
Copy link
Contributor

@jasongrout
Copy link
Contributor

Of note, build:prod:minimize takes significantly more time and memory. Perhaps jupyter lab build --minimize=False would work if it is a resource issue.

@hiramf
Copy link
Author

hiramf commented Sep 10, 2019

Of note, build:prod:minimize takes significantly more time and memory. Perhaps jupyter lab build --minimize=False would work if it is a resource issue.

That would be worth looking into, it seems like there is some inconsistency in whether the build fails or not. (I'm using Docker/PowerShell/Windows 10 with i7-8550U and 16GB RAM).

@jasongrout jasongrout added this to the Reference milestone Sep 12, 2019
@jeremy886
Copy link

[LabBuildApp] JupyterLab 1.1.3
[LabBuildApp] Building in /opt/conda/share/jupyter/lab
[LabBuildApp] Building jupyterlab assets (build:prod:minimize)
An error occured.
RuntimeError: JupyterLab failed to build

I encountered the same issue here.
After adding build --minimize=False to Dockerfile, it works like a charm.

@jasongrout
Copy link
Contributor

Thanks! Closing as answered then. @hiramf - if you find it is still having issues, please comment below or open a new issue.

@lock lock bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Nov 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Nov 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

No branches or pull requests

3 participants