# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
FROM jupyter/pyspark-notebook

MAINTAINER Jupyter Project <jupyter@googlegroups.com>

USER $NBUSER

RUN conda create --quiet --yes -p $CONDA_DIR/envs/python2 python=2.7 \
    'ipython=4.1*' \
    'ipywidgets=4.1*' \
    'pandas' \
    'cython' \
    'matplotlib=1.5*' \
    'scipy=0.17*' \
    'seaborn=0.7*' \
    'bokeh=0.11*' \
    'pyzmq' \
    'mysql-connector-python' \
    && conda clean -tipsy

# Install Python 2 kernel spec globally to avoid permission problems when
# NB_UID switching at runtime.

USER root

RUN $CONDA_DIR/envs/python2/bin/python -m ipykernel install

USER $NB_USER


# Add Live slideshows with RISE
RUN wget https://github.com/pdonorio/RISE/archive/master.tar.gz \
    && tar xvzf *.gz && cd RISE-master && $CONDA_DIR/envs/python2/bin/python setup.py install

