-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
df53396
commit f7b7239
Showing
1 changed file
with
32 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,55 @@ | ||
FROM jupyter/minimal-notebook:lab-3.6.1 | ||
|
||
USER root | ||
|
||
# -- dev - Installation of basic packages / utilities / apps | ||
RUN set -x \ | ||
&& apt-get update -y \ | ||
&& apt-get install -y --no-install-recommends xubuntu-desktop \ | ||
&& apt-get install -y --no-install-recommends wget \ | ||
&& apt-get install -y --no-install-recommends curl \ | ||
&& apt-get install -y --no-install-recommends iputils-ping \ | ||
&& apt-get install -y --no-install-recommends xauth xinit dbus-x11 \ | ||
&& apt-get install -y --no-install-recommends tigervnc-standalone-server tigervnc-xorg-extension \ | ||
# && apt-get install ./chromium.deb \ | ||
# Cleanup -- screensaver causes issues in VNC | ||
&& apt-get purge -y pm-utils xscreensaver* \ | ||
# Installation of utilities | ||
&& apt-get install -y vim file | ||
|
||
&& apt-get install -y vim wget curl iputils-ping software-properties-common \ | ||
&& add-apt-repository ppa:mozillateam/ppa \ | ||
&& apt-get install -y firefox | ||
|
||
# setup package, enable classic extension, build lab extension | ||
RUN mamba install -q -c conda-forge -y websockify | ||
# -- dev - pre-install dependencies - only needed for local testing (faster rebuild) | ||
RUN mamba install -q -c conda-forge -y websockify jupyter-server-proxy | ||
RUN fix-permissions /opt/conda | ||
|
||
# Install this proxy package | ||
WORKDIR "${HOME}/jupyter-tigervnc-novnc-proxy" | ||
COPY . . | ||
RUN python3 -m pip install "${HOME}/jupyter-tigervnc-novnc-proxy" | ||
# RUN python3 -m pip install git+https://github.com/huntdatacenter/workbench-app-example.git@main#egg=workbench-example-app | ||
RUN jupyter serverextension enable --sys-prefix jupyter_server_proxy | ||
RUN jupyter labextension disable "@jupyterlab/apputils-extension:announcements" | ||
RUN fix-permissions /opt/conda | ||
|
||
# copy configs, update permissions as root | ||
# -- dev - jupyter configuration | ||
USER root | ||
RUN rm -rf "${HOME}/jupyter-novnc-proxy" | ||
RUN mv -v /etc/jupyter/jupyter_notebook_config.py /etc/jupyter/jupyter_notebook_config_base.py | ||
COPY setup/jupyter_notebook_config.py /etc/jupyter/jupyter_notebook_config.py | ||
RUN fix-permissions /etc/jupyter | ||
|
||
WORKDIR "${HOME}" | ||
RUN jupyter serverextension enable --sys-prefix jupyter_server_proxy | ||
RUN jupyter labextension disable "@jupyterlab/apputils-extension:announcements" | ||
# -- VNC DEPENDENCIES - installation of core VNC packages | ||
RUN set -x \ | ||
&& apt-get update -y \ | ||
# -- Install XFCE desktop and VNC packages | ||
&& apt-get install -y --no-install-recommends xubuntu-desktop \ | ||
&& apt-get install -y --no-install-recommends xauth xinit dbus-x11 \ | ||
&& apt-get install -y --no-install-recommends tigervnc-standalone-server tigervnc-xorg-extension \ | ||
# -- Cleanup - screensaver causes issues in VNC | ||
&& apt-get purge -y pm-utils xscreensaver* \ | ||
|
||
# -- VNC DEPENDENCIES - Customizations | ||
COPY --chown=root:root setup/hunt_cloud_1440.png /usr/share/backgrounds | ||
COPY --chown=root:root setup/hunt_cloud_2560.png /usr/share/backgrounds | ||
COPY --chown=root:root setup/xfce4-desktop.xml /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml | ||
|
||
# -- VNC DEPENDENCIES - install jupyter-tigervnc-novnc-proxy package | ||
# - use installation from git repository in production setup | ||
# RUN python3 -m pip install git+https://github.com/huntdatacenter/jupyter-tigervnc-novnc-proxy.git@main#egg=jupyter-novnc-prox | ||
# RUN fix-permissions /opt/conda | ||
|
||
# -- dev - local setup | ||
WORKDIR "${HOME}/jupyter-tigervnc-novnc-proxy" | ||
COPY . . | ||
RUN python3 -m pip install "${HOME}/jupyter-tigervnc-novnc-proxy" | ||
RUN fix-permissions /opt/conda | ||
|
||
# -- dev - jupyter user configuration | ||
USER "${NB_USER}" | ||
WORKDIR "${HOME}" | ||
|
||
|
||
# Package related ENV variables should be defined inside python package |