Skip to content

Commit 0599046

Browse files
committed
Various changes to support ubuntu 20.04
1 parent b948122 commit 0599046

File tree

1 file changed

+59
-68
lines changed

1 file changed

+59
-68
lines changed

Dockerfile

Lines changed: 59 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,12 @@ RUN git clone https://github.com/pyenv/pyenv.git $RESOURCES_PATH/.pyenv && \
320320
git clone https://github.com/pyenv/pyenv-virtualenv.git $RESOURCES_PATH/.pyenv/plugins/pyenv-virtualenv && \
321321
git clone git://github.com/pyenv/pyenv-doctor.git $RESOURCES_PATH/.pyenv/plugins/pyenv-doctor && \
322322
git clone https://github.com/pyenv/pyenv-update.git $RESOURCES_PATH/.pyenv/plugins/pyenv-update && \
323-
git clone https://github.com/pyenv/pyenv-which-ext.git $RESOURCES_PATH/.pyenv/plugins/pyenv-which-ext
323+
git clone https://github.com/pyenv/pyenv-which-ext.git $RESOURCES_PATH/.pyenv/plugins/pyenv-which-ext && \
324+
apt-get update && \
325+
# TODO: lib might contain high vulnerability
326+
# Required by pyenv
327+
apt-get install -y --no-install-recommends libffi-dev && \
328+
clean-layer.sh
324329

325330
# Add pyenv to path
326331
ENV PATH=$RESOURCES_PATH/.pyenv/shims:$RESOURCES_PATH/.pyenv/bin:$PATH \
@@ -394,68 +399,38 @@ RUN \
394399

395400
### GUI TOOLS ###
396401

397-
### Install xfce UI
398-
RUN \
399-
apt-get update && \
400-
# Install custom font
401-
apt-get install -y xfce4 xfce4-terminal xterm && \
402-
apt-get purge -y pm-utils xscreensaver* && \
403-
apt-get install -y xfce4-clipman && \
404-
# Cleanup
405-
clean-layer.sh
406-
407-
# Install VNC
408-
RUN \
409-
apt-get update && \
410-
# required for websockify
411-
# apt-get install -y python-numpy && \
412-
cd ${RESOURCES_PATH} && \
413-
# Tiger VNC
414-
wget -qO- https://sourceforge.net/projects/tigervnc/files/stable/1.11.0/tigervnc-1.11.0.x86_64.tar.gz/download | tar xz --strip 1 -C / && \
415-
# Install websockify
416-
mkdir -p ./novnc/utils/websockify && \
417-
# Before updating the noVNC version, we need to make sure that our monkey patching scripts still work!!
418-
wget -qO- https://github.com/novnc/noVNC/archive/v1.2.0.tar.gz | tar xz --strip 1 -C ./novnc && \
419-
wget -qO- https://github.com/novnc/websockify/archive/v0.9.0.tar.gz | tar xz --strip 1 -C ./novnc/utils/websockify && \
420-
chmod +x -v ./novnc/utils/*.sh && \
421-
# create user vnc directory
422-
mkdir -p $HOME/.vnc && \
423-
# Fix permissions
424-
fix-permissions.sh ${RESOURCES_PATH} && \
425-
# Cleanup
426-
clean-layer.sh
427-
428-
# Install Terminal / GDebi (Package Manager) / Glogg (Stream file viewer) & archive tools
429-
# Discover Tools:
430-
# https://wiki.ubuntuusers.de/Startseite/
431-
# https://wiki.ubuntuusers.de/Xfce_empfohlene_Anwendungen/
432-
# https://goodies.xfce.org/start
433-
# https://linux.die.net/man/1/
402+
# Install xfce4 & gui tools
434403
RUN \
404+
# Use staging channel to get newest xfce4 version (4.16)
405+
add-apt-repository -y ppa:xubuntu-dev/staging && \
435406
apt-get update && \
436-
# Configuration database - required by git kraken / atom and other tools (1MB)
407+
apt-get install -y --no-install-recommends xfce4 && \
437408
apt-get install -y --no-install-recommends gconf2 && \
438409
apt-get install -y --no-install-recommends xfce4-terminal && \
410+
apt-get install -y --no-install-recommends xfce4-clipman && \
411+
apt-get install -y --no-install-recommends xterm && \
439412
apt-get install -y --no-install-recommends --allow-unauthenticated xfce4-taskmanager && \
413+
# Install dependencies to enable vncserver
414+
apt-get install -y --no-install-recommends xauth xinit dbus-x11 && \
440415
# Install gdebi deb installer
441416
apt-get install -y --no-install-recommends gdebi && \
442417
# Search for files
443418
apt-get install -y --no-install-recommends catfish && \
444419
apt-get install -y --no-install-recommends font-manager && \
445420
# vs support for thunar
446421
apt-get install -y thunar-vcs-plugin && \
447-
# Streaming text editor for large files
448-
apt-get install -y --no-install-recommends glogg && \
422+
# Streaming text editor for large files - klogg is alternative to glogg
423+
apt-get install -y --no-install-recommends libqt5concurrent5 libqt5widgets5 libqt5xml5 && \
424+
wget --no-verbose https://github.com/variar/klogg/releases/download/v20.12/klogg-20.12.0.813-Linux.deb -O $RESOURCES_PATH/klogg.deb && \
425+
dpkg -i $RESOURCES_PATH/klogg.deb && \
426+
rm $RESOURCES_PATH/klogg.deb && \
427+
# Disk Usage Visualizer
449428
apt-get install -y --no-install-recommends baobab && \
450429
# Lightweight text editor
451-
apt-get install -y mousepad && \
430+
apt-get install -y --no-install-recommends mousepad && \
452431
apt-get install -y --no-install-recommends vim && \
453-
# Install bat - colored cat: https://github.com/sharkdp/bat
454-
wget --no-verbose https://github.com/sharkdp/bat/releases/download/v0.12.1/bat_0.12.1_amd64.deb -O $RESOURCES_PATH/bat.deb && \
455-
dpkg -i $RESOURCES_PATH/bat.deb && \
456-
rm $RESOURCES_PATH/bat.deb && \
457432
# Process monitoring
458-
apt-get install -y htop && \
433+
apt-get install -y --no-install-recommends htop && \
459434
# Install Archive/Compression Tools: https://wiki.ubuntuusers.de/Archivmanager/
460435
apt-get install -y p7zip p7zip-rar && \
461436
apt-get install -y --no-install-recommends thunar-archive-plugin && \
@@ -477,6 +452,7 @@ RUN \
477452
apt-get install -y chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg && \
478453
ln -s /usr/bin/chromium-browser /usr/bin/google-chrome && \
479454
# Cleanup
455+
apt-get purge -y pm-utils xscreensaver* && \
480456
# Large package: gnome-user-guide 50MB app-install-data 50MB
481457
apt-get remove -y app-install-data gnome-user-guide && \
482458
clean-layer.sh
@@ -486,6 +462,27 @@ RUN \
486462
# Call order: https://unix.stackexchange.com/questions/367600/what-is-the-order-that-linuxs-dynamic-linker-searches-paths-in
487463
ENV LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:$CONDA_ROOT/lib
488464

465+
# Install VNC
466+
RUN \
467+
apt-get update && \
468+
# required for websockify
469+
# apt-get install -y python-numpy && \
470+
cd ${RESOURCES_PATH} && \
471+
# Tiger VNC
472+
wget -qO- https://sourceforge.net/projects/tigervnc/files/stable/1.11.0/tigervnc-1.11.0.x86_64.tar.gz/download | tar xz --strip 1 -C / && \
473+
# Install websockify
474+
mkdir -p ./novnc/utils/websockify && \
475+
# Before updating the noVNC version, we need to make sure that our monkey patching scripts still work!!
476+
wget -qO- https://github.com/novnc/noVNC/archive/v1.2.0.tar.gz | tar xz --strip 1 -C ./novnc && \
477+
wget -qO- https://github.com/novnc/websockify/archive/v0.9.0.tar.gz | tar xz --strip 1 -C ./novnc/utils/websockify && \
478+
chmod +x -v ./novnc/utils/*.sh && \
479+
# create user vnc directory
480+
mkdir -p $HOME/.vnc && \
481+
# Fix permissions
482+
fix-permissions.sh ${RESOURCES_PATH} && \
483+
# Cleanup
484+
clean-layer.sh
485+
489486
# Install Web Tools - Offered via Jupyter Tooling Plugin
490487

491488
## VS Code Server: https://github.com/codercom/code-server
@@ -584,10 +581,8 @@ RUN \
584581
# TODO: temp fix: yarl version 1.5 is required for lots of libraries.
585582
'yarl==1.5.*' \
586583
# TODO install scipy, numpy, sklearn, and numexpr via conda for mkl optimizaed versions: https://docs.anaconda.com/mkl-optimizations/
587-
# TODO: Newer scipy versions will be downgraded
588-
'scipy==1.4.*' \
589-
# TODO: Newer numpy versions will be downgraded
590-
'numpy==1.18.*' \
584+
'scipy==1.7.*' \
585+
'numpy==1.19.*' \
591586
scikit-learn \
592587
numexpr && \
593588
# installed via apt-get and pip: protobuf \
@@ -652,7 +647,7 @@ RUN \
652647
# Faiss - A library for efficient similarity search and clustering of dense vectors.
653648
conda install -y --freeze-installed faiss-cpu && \
654649
# Install full pip requirements
655-
pip install --no-cache-dir --upgrade --upgrade-strategy only-if-needed -r ${RESOURCES_PATH}/libraries/requirements-full.txt && \
650+
pip install --no-cache-dir --upgrade --upgrade-strategy only-if-needed --use-deprecated=legacy-resolver -r ${RESOURCES_PATH}/libraries/requirements-full.txt && \
656651
# Setup Spacy
657652
# Spacy - download and large language removal
658653
python -m spacy download en && \
@@ -693,8 +688,6 @@ RUN \
693688
jupyter nbextensions_configurator enable --sys-prefix && \
694689
# Configure nbdime
695690
nbdime config-git --enable --global && \
696-
# Active nbresuse
697-
jupyter serverextension enable --py nbresuse --sys-prefix && \
698691
# Activate Jupytext
699692
jupyter nbextension enable --py jupytext --sys-prefix && \
700693
# Enable useful extensions
@@ -704,7 +697,7 @@ RUN \
704697
jupyter nbextension enable execute_time/ExecuteTime --sys-prefix && \
705698
jupyter nbextension enable collapsible_headings/main --sys-prefix && \
706699
jupyter nbextension enable codefolding/main --sys-prefix && \
707-
# TODO: Disable pydeck extension, cannot be loaded (404)
700+
# Disable pydeck extension, cannot be loaded (404)
708701
jupyter nbextension disable pydeck/extension && \
709702
# Install and activate Jupyter Tensorboard
710703
pip install --no-cache-dir git+https://github.com/InfuseAI/jupyter_tensorboard.git && \
@@ -766,7 +759,6 @@ RUN \
766759
exit 0 ; \
767760
fi && \
768761
$lab_ext_install @jupyterlab/toc && \
769-
770762
# install temporarily from gitrepo due to the issue that jupyterlab_tensorboard does not work with 3.x yet as described here: https://github.com/chaoleili/jupyterlab_tensorboard/issues/28#issuecomment-783594541
771763
#$lab_ext_install jupyterlab_tensorboard && \
772764
pip install git+https://github.com/chaoleili/jupyterlab_tensorboard.git && \
@@ -796,8 +788,6 @@ RUN \
796788
# produces build error: jupyter labextension install jupyterlab-chart-editor && \
797789
$lab_ext_install jupyterlab-chart-editor && \
798790
# Install jupyterlab variable inspector - https://github.com/lckr/jupyterlab-variableInspector
799-
# TODO: see issue https://github.com/lckr/jupyterlab-variableInspector/issues/207 with installing it
800-
# $lab_ext_install @lckr/jupyterlab_variableinspector && \
801791
pip install lckr-jupyterlab-variableinspector && \
802792
# For holoview
803793
# TODO: pyviz is not yet supported by the current JupyterLab version
@@ -845,6 +835,14 @@ RUN \
845835
# Cleanup
846836
clean-layer.sh
847837

838+
# Install Git LFS
839+
COPY resources/tools/git-lfs.sh $RESOURCES_PATH/tools/git-lfs.sh
840+
841+
RUN \
842+
/bin/bash $RESOURCES_PATH/tools/git-lfs.sh --install && \
843+
# Cleanup
844+
clean-layer.sh
845+
848846
### VSCODE ###
849847

850848
# Install vscode extension
@@ -909,16 +907,9 @@ RUN \
909907
### INCUBATION ZONE ###
910908

911909
RUN \
912-
# TODO: Fix problem with jupyter extension panel: https://github.com/Jupyter-contrib/jupyter_nbextensions_configurator/issues/125
913-
# TODO sed -i 's:notebook/js/mathjaxutils:base/js/mathjaxutils:g' $CONDA_PYTHON_DIR/site-packages/jupyter_nbextensions_configurator/static/nbextensions_configurator/render/render.js && \
914910
apt-get update && \
915-
# TODO: lib contains high vulnerability
916-
apt-get install -y --no-install-recommends libffi-dev && \
917-
# TODO: Downgrade nbresuse to be lab comapatible, upgrade to jupyter-resoure-usage soon: https://github.com/jupyter-server/jupyter-resource-usage
918-
pip install --no-cache-dir nbresuse==0.3.6 && \
919911
# Required by magenta
920912
# apt-get install -y libasound2-dev && \
921-
# apt-get install -y xfce4-clipman && \
922913
# required by rodeo ide (8MB)
923914
# apt-get install -y libgconf2-4 && \
924915
# required for pvporcupine (800kb)
@@ -936,9 +927,9 @@ RUN \
936927
exit 0 ; \
937928
fi && \
938929
# Install fkill-cli program TODO: 30MB, remove?
939-
npm install --global fkill-cli && \
930+
# npm install --global fkill-cli && \
940931
# Activate pretty-errors
941-
python -m pretty_errors -u -p && \
932+
# python -m pretty_errors -u -p && \
942933
# Cleanup
943934
clean-layer.sh
944935

@@ -1042,7 +1033,7 @@ RUN \
10421033
echo "[Desktop Entry]\nVersion=1.0\nType=Link\nName=Glances\nComment=Hardware Monitoring\nCategories=System;Utility;\nIcon=/resources/icons/glances-icon.png\nURL=http://localhost:8092/tools/glances" > /usr/share/applications/glances.desktop && \
10431034
chmod +x /usr/share/applications/glances.desktop && \
10441035
# Remove mail and logout desktop icons
1045-
rm /usr/share/applications/exo-mail-reader.desktop && \
1036+
rm /usr/share/applications/xfce4-mail-reader.desktop && \
10461037
rm /usr/share/applications/xfce4-session-logout.desktop
10471038

10481039
# Copy resources into workspace

0 commit comments

Comments
 (0)