blob: 8154754e7e0e081351f03d15aec9ffe24aab84b2 [file] [log] [blame]
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License
#
# This Dockerfile is for MyBinder support
FROM andrewosh/binder-base
USER root
# for declarativewidgets
RUN curl -sL https://deb.nodesource.com/setup_0.12 | bash - && \
apt-get install -y nodejs npm && \
npm install -g bower
# for Apache Spark demos
ENV APACHE_SPARK_VERSION 3.3.2
ENV APACHE_SPARK_CUSTOM_NAME=hadoop3
RUN apt-get -y update && \
apt-get -y install software-properties-common
RUN \
echo "===> add webupd8 repository..." && \
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886 && \
apt-get update
RUN echo "===> install Java" && \
echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes oracle-java8-installer oracle-java8-set-default && \
apt-get clean && \
update-java-alternatives -s java-8-oracle
RUN cd /tmp && \
wget -q https://archive.apache.org/dist/spark/spark-${APACHE_SPARK_VERSION}/spark-${APACHE_SPARK_VERSION}-bin-${APACHE_SPARK_CUSTOM_NAME}.tgz && \
tar xzf spark-${APACHE_SPARK_VERSION}-bin-${APACHE_SPARK_CUSTOM_NAME}.tgz -C /usr/local && \
rm spark-${APACHE_SPARK_VERSION}-bin-${APACHE_SPARK_CUSTOM_NAME}.tgz
RUN cd /usr/local && ln -s spark-${APACHE_SPARK_VERSION}-bin-${APACHE_SPARK_CUSTOM_NAME} spark
# R support
RUN apt-get update && \
apt-get install -y --no-install-recommends \
fonts-dejavu \
gfortran \
gcc && apt-get clean && \
rm -rf /var/lib/apt/lists/*
ENV SPARK_HOME /usr/local/spark
ENV PYTHONPATH $SPARK_HOME/python:$SPARK_HOME/python/lib/py4j-0.10.9.5-src.zip
ENV PYSPARK_PYTHON /home/main/anaconda2/envs/python3/bin/python
ENV R_LIBS_USER $SPARK_HOME/R/lib
USER main
ENV TOREE_VERSION >=0.6.0.dev1, <=0.6.0
# get to the latest jupyter release and necessary libraries
RUN conda install -y jupyter seaborn futures && \
bash -c "source activate python3 && \
conda install seaborn"
# R packages
RUN conda config --add channels r && \
conda install --quiet --yes \
'r-base=3.2*' \
'r-ggplot2=1.0*' \
'r-rcurl=1.95*' && conda clean -tipsy
# install Toree
RUN pip install 'toree>=0.5.0.dev0, <=0.5.0'
RUN jupyter toree install --user
# include nice intro notebook
COPY index.ipynb $HOME/notebooks/