anchor.diff:      PYSPARK_PYTHON=${CONDA_HOME}/bin/python \
       PYSPARK_SUBMIT_ARGS="--driver-memory=4g pyspark-shell"
       
  -ENV PYTHONPATH=${PYTHONPATH}:${SPARK_HOME}/python:${SPARK_HOME}/python/lib/py4j-0.10.1-src.zip \
  -    SPARK_CLASSPATH="${HADOOP_HOME}/etc/hadoop:${HADOOP_HOME}/share/hadoop/common/lib/*:${HADOOP_HOME}/share/hadoop/common/*:${HADOOP_HOME}/share/hadoop/hdfs:${HADOOP_HOME}/share/hadoop/hdfs/lib/*:${HADOOP_HOME}/share/hadoop/hdfs/*:${HADOOP_HOME}/share/hadoop/yarn/lib/*:${HADOOP_HOME}/share/hadoop/yarn/*:${HADOOP_HOME}/share/hadoop/mapreduce/lib/*:${HADOOP_HOME}/share/hadoop/mapreduce/*:${HADOOP_HOME}/contrib/capacity-scheduler/*.jar" \
  +ENV PYTHONPATH=${PYTHONPATH}:${SPARK_HOME}/python:${SPARK_HOME}/python/lib/py4j-0.10.4-src.zip:${SPARK_HOME}/python/lib/pyspark.zip \
       MESOS_NATIVE_JAVA_LIBRARY=${INSTALL_LOC}/lib/libmesos.so \
  -    SPARK_EXECUTOR_URI=${INSTALL_LOC}/spark-2.1.0-bin-without-hadoop.tgz \
  -    HADOOP_CONF_DIR=${HADOOP_HOME}/etc/hadoop
  -
  +    SPARK_EXECUTOR_URI=${INSTALL_LOC}/${SPARK_PACKAGE}
  +    
   WORKDIR ${INSTALL_LOC}
  -
  -# Set up Hadoop
  -
  -RUN wget --quiet http://archive.apache.org/dist/hadoop/common/hadoop-${HADOOP_VERSION}/${HADOOP_PACKAGE} && \
  -        tar -xzf ${HADOOP_PACKAGE} -C ${INSTALL_LOC} && \
  -	rm -f ${HADOOP_PACKAGE}
   
   # Set up Spark
   
  
positive.code:     PYTHON_EGG_CACHE=/tmp
  
  ENV CONDA_HOME=${INSTALL_LOC}/anaconda2 \
      HADOOP_HOME=${INSTALL_LOC}/hadoop-${HADOOP_VERSION} \
      MESOS_HOME=${INSTALL_LOC}/mesos-${MESOS_VER} \
      HADOOP_PACKAGE=hadoop-${HADOOP_VERSION}.tar.gz \
      SPARK_DIR=spark-${SPARK_VERSION} \
      SPARK_PACKAGE=spark-${SPARK_VERSION}-bin-without-hadoop \
      MESOS_MASTER=mesos://${MESOS_IP}:${MESOS_PORT} \
      MESOS_PACKAGE=mesos-${MESOS_VER}.tar.gz
  
  
negative.code: RUN cd ${CONDA_HOME}/lib && \
      ln -s libnetcdf.so.11 libnetcdf.so.7 && \
      ln -s libkea.so.1.4.6 libkea.so.1.4.5 && \
      ln -s libhdf5_cpp.so.12 libhdf5_cpp.so.10 && \
      ln -s libjpeg.so.9 libjpeg.so.8
  
  # Retrieve NEXUS code and build it.
  
  WORKDIR /
  
  RUN git clone https://github.com/dataplumber/nexus.git
  
  