Commit 69c5c35f authored by Peter Parente's avatar Peter Parente

Run pyspark, all-spark, scipy, r conda installs as jovyan

… but install kernel specs global to avoid problems when switching NB_UID

Contribution (c) Copyright IBM Corp. 2015
parent b6ecf61d
...@@ -49,6 +49,8 @@ ENV R_LIBS_USER $SPARK_HOME/R/lib ...@@ -49,6 +49,8 @@ ENV R_LIBS_USER $SPARK_HOME/R/lib
ENV PYTHONPATH $SPARK_HOME/python:$SPARK_HOME/python/lib/py4j-0.8.2.1-src.zip ENV PYTHONPATH $SPARK_HOME/python:$SPARK_HOME/python/lib/py4j-0.8.2.1-src.zip
ENV MESOS_NATIVE_LIBRARY /usr/local/lib/libmesos.so ENV MESOS_NATIVE_LIBRARY /usr/local/lib/libmesos.so
USER jovyan
# Install Python 3 packages # Install Python 3 packages
RUN conda install --yes \ RUN conda install --yes \
'ipywidgets=4.0*' \ 'ipywidgets=4.0*' \
...@@ -59,7 +61,7 @@ RUN conda install --yes \ ...@@ -59,7 +61,7 @@ RUN conda install --yes \
'scikit-learn=0.16*' \ 'scikit-learn=0.16*' \
&& conda clean -yt && conda clean -yt
# Install Python 2 packages and kernel spec # Install Python 2 packages
RUN conda create -p $CONDA_DIR/envs/python2 python=2.7 \ RUN conda create -p $CONDA_DIR/envs/python2 python=2.7 \
'ipython=4.0*' \ 'ipython=4.0*' \
'ipywidgets=4.0*' \ 'ipywidgets=4.0*' \
...@@ -70,9 +72,6 @@ RUN conda create -p $CONDA_DIR/envs/python2 python=2.7 \ ...@@ -70,9 +72,6 @@ RUN conda create -p $CONDA_DIR/envs/python2 python=2.7 \
'scikit-learn=0.16*' \ 'scikit-learn=0.16*' \
pyzmq \ pyzmq \
&& conda clean -yt && conda clean -yt
RUN $CONDA_DIR/envs/python2/bin/python \
$CONDA_DIR/envs/python2/bin/ipython \
kernelspec install-self
# R packages # R packages
RUN conda config --add channels r RUN conda config --add channels r
...@@ -83,5 +82,13 @@ RUN conda install --yes \ ...@@ -83,5 +82,13 @@ RUN conda install --yes \
'r-rcurl=1.95*' && conda clean -yt 'r-rcurl=1.95*' && conda clean -yt
# Scala Spark kernel spec # Scala Spark kernel spec
RUN mkdir -p /usr/local/share/jupyter/kernels/scala RUN mkdir -p /opt/conda/share/jupyter/kernels/scala
COPY kernel.json /usr/local/share/jupyter/kernels/scala/ COPY kernel.json /opt/conda/share/jupyter/kernels/scala/
USER root
# Install Python 2 kernel spec globally to avoid permission problems when NB_UID
# switching at runtime.
RUN $CONDA_DIR/envs/python2/bin/python \
$CONDA_DIR/envs/python2/bin/ipython \
kernelspec install-self
\ No newline at end of file
...@@ -27,6 +27,8 @@ ENV SPARK_HOME /usr/local/spark ...@@ -27,6 +27,8 @@ ENV SPARK_HOME /usr/local/spark
ENV PYTHONPATH $SPARK_HOME/python:$SPARK_HOME/python/lib/py4j-0.8.2.1-src.zip ENV PYTHONPATH $SPARK_HOME/python:$SPARK_HOME/python/lib/py4j-0.8.2.1-src.zip
ENV MESOS_NATIVE_LIBRARY /usr/local/lib/libmesos.so ENV MESOS_NATIVE_LIBRARY /usr/local/lib/libmesos.so
USER jovyan
# Install Python 3 packages # Install Python 3 packages
RUN conda install --yes \ RUN conda install --yes \
'ipywidgets=4.0*' \ 'ipywidgets=4.0*' \
...@@ -48,6 +50,11 @@ RUN conda create -p $CONDA_DIR/envs/python2 python=2.7 \ ...@@ -48,6 +50,11 @@ RUN conda create -p $CONDA_DIR/envs/python2 python=2.7 \
'scikit-learn=0.16*' \ 'scikit-learn=0.16*' \
pyzmq \ pyzmq \
&& conda clean -yt && conda clean -yt
USER root
# Install Python 2 kernel spec globally to avoid permission problems when NB_UID
# switching at runtime.
RUN $CONDA_DIR/envs/python2/bin/python \ RUN $CONDA_DIR/envs/python2/bin/python \
$CONDA_DIR/envs/python2/bin/ipython \ $CONDA_DIR/envs/python2/bin/ipython \
kernelspec install-self kernelspec install-self
\ No newline at end of file
...@@ -3,7 +3,7 @@ FROM jupyter/minimal-notebook ...@@ -3,7 +3,7 @@ FROM jupyter/minimal-notebook
MAINTAINER Jupyter Project <jupyter@googlegroups.com> MAINTAINER Jupyter Project <jupyter@googlegroups.com>
USER root USER jovyan
# R pre-requisites # R pre-requisites
RUN apt-get update && \ RUN apt-get update && \
...@@ -33,3 +33,5 @@ RUN conda install --yes \ ...@@ -33,3 +33,5 @@ RUN conda install --yes \
'r-caret=6.0*' \ 'r-caret=6.0*' \
'r-rcurl=1.95*' \ 'r-rcurl=1.95*' \
'r-randomforest=4.6*' && conda clean -yt 'r-randomforest=4.6*' && conda clean -yt
USER root
\ No newline at end of file
...@@ -3,7 +3,7 @@ FROM jupyter/minimal-notebook ...@@ -3,7 +3,7 @@ FROM jupyter/minimal-notebook
MAINTAINER Jupyter Project <jupyter@googlegroups.com> MAINTAINER Jupyter Project <jupyter@googlegroups.com>
USER root USER jovyan
# Install Python 3 packages # Install Python 3 packages
RUN conda install --yes \ RUN conda install --yes \
...@@ -24,7 +24,7 @@ RUN conda install --yes \ ...@@ -24,7 +24,7 @@ RUN conda install --yes \
'bokeh=0.9*' \ 'bokeh=0.9*' \
&& conda clean -yt && conda clean -yt
# Install Python 2 packages and kernel spec # Install Python 2 packages
RUN conda create -p $CONDA_DIR/envs/python2 python=2.7 \ RUN conda create -p $CONDA_DIR/envs/python2 python=2.7 \
'ipython=4.0*' \ 'ipython=4.0*' \
'ipywidgets=4.0*' \ 'ipywidgets=4.0*' \
...@@ -44,6 +44,11 @@ RUN conda create -p $CONDA_DIR/envs/python2 python=2.7 \ ...@@ -44,6 +44,11 @@ RUN conda create -p $CONDA_DIR/envs/python2 python=2.7 \
'bokeh=0.9*' \ 'bokeh=0.9*' \
pyzmq \ pyzmq \
&& conda clean -yt && conda clean -yt
USER root
# Install Python 2 kernel spec globally to avoid permission problems when NB_UID
# switching at runtime.
RUN $CONDA_DIR/envs/python2/bin/python \ RUN $CONDA_DIR/envs/python2/bin/python \
$CONDA_DIR/envs/python2/bin/ipython \ $CONDA_DIR/envs/python2/bin/ipython \
kernelspec install-self kernelspec install-self
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment