From e89f0b278b414b3425296fcc364e8b5eda31bbe0 Mon Sep 17 00:00:00 2001 From: Min RK Date: Tue, 28 Jun 2016 13:04:13 +0200 Subject: [PATCH] inherit pyspark from scipy-notebook removes duplicate installation of python 2 env and Python packages. There are very few packages in scipy not in pyspark, so removing the duplicate seems valuable. --- pyspark-notebook/Dockerfile | 43 +------------------------------------ 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/pyspark-notebook/Dockerfile b/pyspark-notebook/Dockerfile index b508e99d..4d81ef33 100644 --- a/pyspark-notebook/Dockerfile +++ b/pyspark-notebook/Dockerfile @@ -1,6 +1,6 @@ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. -FROM jupyter/minimal-notebook +FROM jupyter/scipy-notebook MAINTAINER Jupyter Project @@ -40,44 +40,3 @@ ENV MESOS_NATIVE_LIBRARY /usr/local/lib/libmesos.so ENV SPARK_OPTS --driver-java-options=-Xms1024M --driver-java-options=-Xmx4096M --driver-java-options=-Dlog4j.logLevel=info USER $NB_USER - -# Install Python 3 packages -RUN conda install --quiet --yes \ - 'ipywidgets=5.1*' \ - 'pandas=0.17*' \ - 'numexpr=2.5*' \ - 'matplotlib=1.5*' \ - 'scipy=0.17*' \ - 'seaborn=0.7*' \ - 'scikit-learn=0.17*' \ - jq \ - && conda clean -tipsy -# Activate ipywidgets extension in the environment that runs the notebook server -RUN jupyter nbextension enable --py widgetsnbextension --sys-prefix - -# Install Python 2 packages and kernel spec -RUN conda create --quiet --yes -p $CONDA_DIR/envs/python2 python=2.7 \ - 'ipython=4.2*' \ - 'ipywidgets=5.1*' \ - 'pandas=0.17*' \ - 'numexpr=2.5*' \ - 'matplotlib=1.5*' \ - 'scipy=0.17*' \ - 'seaborn=0.7*' \ - 'scikit-learn=0.17*' \ - pyzmq \ - && conda clean -tipsy -# Add shortcuts to distinguish pip for python2 and python3 envs -RUN ln -s $CONDA_DIR/envs/python2/bin/pip $CONDA_DIR/bin/pip2 && \ - ln -s $CONDA_DIR/bin/pip $CONDA_DIR/bin/pip3 - -# Install Python 2 kernel spec into the Python 3 conda environment which -# runs the notebook server -RUN bash -c '. activate python2 && \ - python -m ipykernel.kernelspec --prefix=$CONDA_DIR && \ - . deactivate' -# Set PYSPARK_HOME in the python2 spec -RUN jq --arg v "$CONDA_DIR/envs/python2/bin/python" \ - '.["env"]["PYSPARK_PYTHON"]=$v' \ - $CONDA_DIR/share/jupyter/kernels/python2/kernel.json > /tmp/kernel.json && \ - mv /tmp/kernel.json $CONDA_DIR/share/jupyter/kernels/python2/kernel.json