Skip to content

Commit

Permalink
Merge pull request #1 from 2i2c-org/customise-environment
Browse files Browse the repository at this point in the history
  • Loading branch information
sgibson91 authored Jul 25, 2022
2 parents 658f6dc + 6d4f05c commit 7b080be
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 5 deletions.
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

0 comments on commit 7b080be

Please sign in to comment.