Skip to content

jupyter install failure docker container build #49

@deeprave

Description

@deeprave

i am attempting to build a Docker container with jupyterlab + notebook + r + this drawio extension. It is based on the Dockerfile for anaconda3 from hub.docker.com.

NodeJS 10.15.2
Npm 5.8.0

(these are both installed with current jupyterlab apparently)

$ jupyter -v

jupyter core     : 4.5.0
jupyter-notebook : 6.0.1
qtconsole        : 4.5.5
ipython          : 7.8.0
ipykernel        : 5.1.2
jupyter client   : 5.3.3
jupyter lab      : 1.1.4
nbconvert        : 5.6.0
ipywidgets       : 7.5.1
nbformat         : 4.4.0
traitlets        : 4.3.3

Failure message as follows:

jupyter labextension install jupyterlab-drawio
Building jupyterlab assets (build:prod:minimize)
An error occured.
RuntimeError: JupyterLab failed to build
See the log file for details:  /tmp/jupyterlab-debug-3uijdxha.log

/tmp/jupyterlab-debug-3uijdxha.log contains:

Building jupyterlab assets (build:prod:minimize)
> node /opt/conda/lib/python3.7/site-packages/jupyterlab/staging/yarn.js install --non-interactive
yarn install v1.15.2
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@1.2.9: The platform "linux" is incompatible with this module.
info "fsevents@1.2.9" 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 11.36s.

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

> node /opt/conda/lib/python3.7/site-packages/jupyterlab/staging/yarn.js run build:prod:minimize
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.

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

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

  File "/opt/conda/lib/python3.7/site-packages/jupyterlab/labextensions.py", line 105, in start
    core_config=self.core_config)

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

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

RuntimeError: JupyterLab failed to build

Exiting application: jupyter

/opt/conda/lib/python3.7/site-packages/jupyterlab/staging/webpack.prod.minimize.config.js

const TerserPlugin = require('terser-webpack-plugin');
var merge = require('webpack-merge');
var config = require('./webpack.config');

config[0] = merge(config[0], {
  mode: 'production',
  devtool: 'source-map',
  optimization: {
    minimizer: [
      new TerserPlugin({
        parallel: true,
        sourceMap: true,
        terserOptions: {
          compress: false,
          ecma: 6,
          mangle: true,
          output: {
            beautify: false,
            comments: false
          },
          safari10: true
        },
        cache: process.platform !== 'win32'
      })
    ]
  }
});

module.exports = config;

Activity

deeprave

deeprave commented on Dec 19, 2019

@deeprave
Author

Digging into this a little further I tried building a dev installation within the container:
after the npm build aI get:

#  jupyter labextension link .
Installing /opt/conda/lib/python3.7/site-packages/jupyterlab/staging as a linked package because it does not have extension metadata:
   `mimeExtension` and `extension` must point to different modules
Building jupyterlab assets (build:dev:minimize)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @deeprave

        Issue actions

          jupyter install failure docker container build · Issue #49 · QuantStack/jupyterlab-drawio