anchor.diff:  # Docker demo image, as used on try.jupyter.org and tmpnb.org
   
  -FROM jupyter/minimal-notebook:a249876881d3
  +FROM jupyter/all-spark-notebook:a249876881d3
   
   MAINTAINER Jupyter Project <jupyter@googlegroups.com>
   
   # Install system libraries first as root
   USER root
  -
  -# Julia dependencies
  -RUN apt-get update &&  \
  -    apt-get install -y julia libnettle4 && \
  -    apt-get clean
  -
  -# R dependencies that conda can't provide (X, fonts, compilers)
  -RUN apt-get update && \
  -    apt-get install -y libxrender1 fonts-dejavu gfortran gcc && \
  -    apt-get clean
   
   # The Glorious Glasgow Haskell Compiler
   RUN apt-get update && \
  
positive.code: RUN gem update --system --no-document && \
      gem install --no-document sciruby-full
  
  # Spark dependencies
  ENV APACHE_SPARK_VERSION 1.4.1
  RUN apt-get update && \
      apt-get install -y --no-install-recommends openjdk-7-jre-headless && \
      apt-get clean
  RUN wget -qO - http://d3kbcqa49mib13.cloudfront.net/spark-${APACHE_SPARK_VERSION}-bin-hadoop2.6.tgz | tar -xz -C /usr/local/ && \
      cd /usr/local && \
      ln -s spark-${APACHE_SPARK_VERSION}-bin-hadoop2.6 spark
  
  # Scala Spark kernel (build and cleanup)
  RUN cd /tmp && \
      echo deb http://dl.bintray.com/sbt/debian / > /etc/apt/sources.list.d/sbt.list && \
      apt-get update && \
      git clone https://github.com/ibm-et/spark-kernel.git && \
      apt-get install -yq --force-yes --no-install-recommends sbt && \
      cd spark-kernel && \
      git checkout 9db161f8667a3f148cd5d811be044db137db13c9 && \
      sbt compile -Xms1024M \
          -Xmx2048M \
          -Xss1M \
          -XX:+CMSClassUnloadingEnabled \
          -XX:MaxPermSize=1024M && \
      sbt pack && \
      mv kernel/target/pack /opt/sparkkernel && \
      chmod +x /opt/sparkkernel && \
      rm -rf ~/.ivy2 && \
      rm -rf ~/.sbt && \
      rm -rf /tmp/spark-kernel && \
      apt-get remove -y sbt && \
      apt-get clean
  
  # Now switch to jovyan for all conda and other package manager installs
  USER jovyan
  
  ENV PATH /home/jovyan/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.8.4/bin:/opt/happy/1.19.4/bin:/opt/alex/3.1.3/bin:$PATH
  ENV SPARK_HOME /usr/local/spark
  ENV PYTHONPATH $SPARK_HOME/python:$SPARK_HOME/python/lib/py4j-0.8.2.1-src.zip
  
  # Python packages
  RUN conda install --yes numpy pandas scikit-learn scikit-image matplotlib scipy seaborn sympy cython patsy statsmodels cloudpickle dill numba bokeh beautifulsoup4 && conda clean -yt
  
  # Now for a python2 environment
  RUN conda create -p $CONDA_DIR/envs/python2 python=2.7 ipykernel numpy pandas scikit-learn scikit-image matplotlib scipy seaborn sympy cython patsy statsmodels cloudpickle dill numba bokeh && conda clean -yt
  RUN $CONDA_DIR/envs/python2/bin/python \
      $CONDA_DIR/envs/python2/bin/ipython \
      kernel install --user
  
  # IRuby
  RUN iruby register
  
  # R packages
  RUN conda config --add channels r
  RUN conda install --yes r-irkernel r-plyr r-devtools r-rcurl r-dplyr r-ggplot2 r-caret rpy2 r-tidyr r-shiny r-rmarkdown r-forecast r-stringr r-rsqlite r-reshape2 r-nycflights13 r-randomforest && conda clean -yt
  
  # IJulia and Julia packages
  RUN julia -e 'Pkg.add("IJulia")'
  RUN julia -e 'Pkg.add("Gadfly")' && julia -e 'Pkg.add("RDatasets")'
  
  # IHaskell + IHaskell-Widgets + Dependencies for examples
  RUN cabal update && \
  
negative.code: COPY notebooks/ /home/jovyan/work/
  COPY datasets/ /home/jovyan/work/datasets/
  
  # Switch back to root for permission fixes, conversions, and trust. Make sure
  # trust is done as jovyan so that the signing secret winds up in the jovyan
  # profile, not root's
  