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

Docker image does not build #28

Closed
xprizedevops opened this issue Feb 4, 2020 · 8 comments · Fixed by #56
Closed

Docker image does not build #28

xprizedevops opened this issue Feb 4, 2020 · 8 comments · Fixed by #56
Labels
bug Something isn't working as expected

Comments

@xprizedevops
Copy link

Describe the bug:

When I build the image with docker, I get errors.
I run the following command inside the project root folder:
docker image build -t ml-workspace .

After a while I get the error at step 50/97:
RuntimeError: JupyterLab failed to build

Expected behaviour:

Success build.

Steps to reproduce the issue:

I run the following command inside the project root folder:
docker image build -t ml-workspace .

After a while I get the error at step 50/97:

Step 50/97 : RUN     jupyter lab build &&     jupyter labextension install @jupyter-widgets/jupyterlab-manager &&     if [ "$WORKSPACE_FLAVOR" = "minimal" ]; then         jupyter lab clean &&         jlpm cache clean &&         rm -rf $CONDA_DIR/share/jupyter/lab/staging &&         clean-layer.sh &&         exit 0 ;     fi &&     jupyter labextension install @jupyterlab/toc &&     jupyter labextension install jupyterlab_tensorboard &&     jupyter labextension install @jupyterlab/git &&     pip install jupyterlab-git &&     jupyter serverextension enable --py jupyterlab_git &&     jupyter labextension install jupyter-matplotlib &&     if [ "$WORKSPACE_FLAVOR" = "light" ]; then         jupyter lab clean &&         jlpm cache clean &&         rm -rf $CONDA_DIR/share/jupyter/lab/staging &&         clean-layer.sh &&         exit 0 ;     fi &&     pip install --pre jupyter-lsp &&     jupyter labextension install @krassowski/jupyterlab-lsp &&     jupyter labextension install @jupyterlab/plotly-extension &&     jupyter labextension install jupyterlab-chart-editor &&     jupyter labextension install @pyviz/jupyterlab_pyviz &&     jupyter labextension install @lckr/jupyterlab_variableinspector &&     jupyter labextension install @ryantam626/jupyterlab_code_formatter &&     pip install jupyterlab_code_formatter &&     jupyter serverextension enable --py jupyterlab_code_formatter &&     jupyter lab build &&     jupyter lab clean &&     jlpm cache clean &&     rm -rf $CONDA_DIR/share/jupyter/lab/staging &&     clean-layer.sh
 ---> Running in 62ce5b6a94e6
[LabBuildApp] JupyterLab 1.2.5
[LabBuildApp] Building in /opt/conda/share/jupyter/lab
[LabBuildApp] Building jupyterlab assets (build:prod:minimize)
An error occured.
RuntimeError: JupyterLab failed to build

Technical details:

  • Workspace version : 0.9.1
  • Docker version : 19.03.05
  • Host Machine OS (Windows/Linux/Mac): Windows
  • Command used to start the workspace :
  • Browser (Chrome/Firefox/Safari):

Possible Fix:

Additional context:

@xprizedevops xprizedevops added the bug Something isn't working as expected label Feb 4, 2020
@LukasMasuch
Copy link
Contributor

@xprizedevops Just run the build myself with 0.9.1 and docker image build -t ml-workspace .. However, I do not get this error as you can see here:

Step 50/97 : RUN     echo "" &&     jupyter lab build &&     jupyter labextension install @jupyter-widgets/jupyterlab-manager &&     if [ "$WORKSPACE_FLAVOR" = "minimal" ]; then         jupyter lab clean &&         jlpm cache clean &&         rm -rf $CONDA_DIR/share/jupyter/lab/staging &&         clean-layer.sh &&         exit 0 ;     fi &&     jupyter labextension install @jupyterlab/toc &&     jupyter labextension install jupyterlab_tensorboard &&     jupyter labextension install @jupyterlab/git &&     pip install jupyterlab-git &&     jupyter serverextension enable --py jupyterlab_git &&     jupyter labextension install jupyter-matplotlib &&     if [ "$WORKSPACE_FLAVOR" = "light" ]; then         jupyter lab clean &&         jlpm cache clean &&         rm -rf $CONDA_DIR/share/jupyter/lab/staging &&         clean-layer.sh &&         exit 0 ;     fi &&     pip install --pre jupyter-lsp &&     jupyter labextension install @krassowski/jupyterlab-lsp &&     jupyter labextension install @jupyterlab/plotly-extension &&     jupyter labextension install jupyterlab-chart-editor &&     jupyter labextension install @pyviz/jupyterlab_pyviz &&     jupyter labextension install @lckr/jupyterlab_variableinspector &&     jupyter labextension install @ryantam626/jupyterlab_code_formatter &&     pip install jupyterlab_code_formatter &&     jupyter serverextension enable --py jupyterlab_code_formatter &&     jupyter lab build &&     jupyter lab clean &&     jlpm cache clean &&     rm -rf $CONDA_DIR/share/jupyter/lab/staging &&     clean-layer.sh
 ---> Running in bc42b4c3672d

[LabBuildApp] JupyterLab 1.2.5
[LabBuildApp] Building in /opt/conda/share/jupyter/lab
[LabBuildApp] Building jupyterlab assets (build:prod:minimize)
Building jupyterlab assets (build:prod:minimize)
Building jupyterlab assets (build:prod:minimize)
Building jupyterlab assets (build:prod:minimize)
Building jupyterlab assets (build:prod:minimize)
Collecting jupyterlab-git
  Downloading jupyterlab_git-0.9.0-py3-none-any.whl (144 kB)
...

There might have been a temporary problem with the internet connection, too less disk space, or too less memory to complete the jupyterlab build. Just try it again and check if your disk space and memory is enough. Also check if the docker daemon has access to enough disk space and memory. It might be that your docker daemon is at the disk space limit and you might need to cleanup docker artifacts (e.g via docker system prune). Also, I have never build it on a Windows system (only Linux and Mac), so there might be certain issues with building it on Windows which I'm unaware of.

@LukasMasuch
Copy link
Contributor

I just rerun the build, and this time I got the same RuntimeError, but a few steps later. I will investigate this a bit further.

@xprizedevops
Copy link
Author

I just rerun the build, and this time I got the same RuntimeError, but a few steps later. I will investigate this a bit further.

Me too. I prune the system and verified that there is enough space.
I also noticed that if I comment out the jupyter labextension install commands, the build completes just fine.
Thanks

@LukasMasuch
Copy link
Contributor

LukasMasuch commented Feb 4, 2020

I found out that the plotly chart editor extension currently causes trouble and removed it (see commit). You can check out the develop branch and try it again. Without this extension everything works fine for me.

@LukasMasuch
Copy link
Contributor

@xprizedevops I just pushed another commit to develop which adds stdout logging to all lab extension installs. So, if there is an error you should now get the error, logs within the docker build logs.

@xprizedevops
Copy link
Author

@xprizedevops I just pushed another commit to develop which adds stdout logging to all lab extension installs. So, if there is an error you should now get the error, logs within the docker build logs.

I just commented out the plotly chart extension installation but I still get errors.
I'm now trying the latest commit (dev) with stdout logging...

@LukasMasuch
Copy link
Contributor

@xprizedevops did you managed to build the container image?

@xprizedevops
Copy link
Author

I'm still having issues. This time is a different issue while building the image:

Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.
: not foundean-layer.sh: 1: /usr/bin/clean-layer.sh:
/usr/bin/clean-layer.sh: 11: set: Illegal option -
The command '/bin/sh -c apt-get update &&     apt-get install -y locales &&     sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen &&     locale-gen &&     dpkg-reconfigure --frontend=noninteractive locales &&     update-locale LANG=en_US.UTF-8 &&     clean-layer.sh' returned a non-zero code: 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants