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

Image Customisation: Pangeo-style image with VNC/Linux desktop feature #1

Merged
merged 13 commits into from
Jul 25, 2022
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ignore folders
.github/
images/
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This Dockerfile aims to provide a Pangeo-style image with the VNC/Linux Desktop feature
# It was constructed by following the instructions and copying code snippets laid out
# and linked from here:
# https://github.com/2i2c-org/infrastructure/issues/1444#issuecomment-1187405324

FROM pangeo/pangeo-notebook:2022.07.13

USER root
ENV DEBIAN_FRONTEND=noninteractive
ENV PATH ${NB_PYTHON_PREFIX}/bin:$PATH

# Needed for apt-key to work
RUN apt-get update -qq --yes > /dev/null && \
apt-get install --yes -qq gnupg2 > /dev/null && \
rm -rf /var/lib/apt/lists/*

# Install TurboVNC (https://github.com/TurboVNC/turbovnc)
ARG TURBOVNC_VERSION=2.2.6
RUN wget -q "https://sourceforge.net/projects/turbovnc/files/${TURBOVNC_VERSION}/turbovnc_${TURBOVNC_VERSION}_amd64.deb/download" -O turbovnc.deb \
&& apt-get update -qq --yes > /dev/null \
&& apt-get install -y ./turbovnc.deb > /dev/null \
# remove light-locker to prevent screen lock
&& apt-get remove -y light-locker > /dev/null \
&& rm ./turbovnc.deb \
&& ln -s /opt/TurboVNC/bin/* /usr/local/bin/ \
&& rm -rf /var/lib/apt/lists/*

USER ${NB_USER}

COPY environment.yml /tmp/
RUN mamba env update --name ${CONDA_ENV} -f environment.yml
# Remove nb_conda_kernels from the env for now
RUN mamba remove -n ${CONDA_ENV} nb_conda_kernels
18 changes: 13 additions & 5 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# This is the standard conda configuration file. Use this file to list
# the conda packages that you need installed in your environment.
# Environment we need *on top* of base PANGEO stack
# Get list of pangeo packages from https://github.com/pangeo-data/pangeo-docker-images/blob/master/pangeo-notebook/packages.txt
# BUT REMEMBER TO PICK THE HASH THAT CORRESPONDS TO OUR BASE IMAGE
channels:
- conda-forge

dependencies:
- jupyter_contrib_nbextensions==0.5.1
# Add other packages here
# -
# Packages required for image
- pip

# Packages required by AWI-CIROH
- websockify
- pip:
# jupyter-remote-desktop-proxy enables us to visit the /desktop path
# just like we visit the /lab path. Visiting /desktop provides us
# with an actual remote desktop experience.
- https://github.com/jupyterhub/jupyter-remote-desktop-proxy/archive/main.zip