-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Copyright (c) Jupyter Development Team. | ||
# Distributed under the terms of the Modified BSD License. | ||
FROM jupyter/scipy-notebook | ||
|
||
MAINTAINER Jupyter Project <jupyter@googlegroups.com> | ||
|
||
USER root | ||
|
||
RUN pip --no-cache-dir install optimuspyspark | ||
RUN git clone https://github.com/ironmussa/Optimus-examples.git /home/jovyan/work | ||
RUN chmod -R 777 /home/jovyan/work | ||
|
||
# Spark dependencies | ||
ENV APACHE_SPARK_VERSION 2.2.0 | ||
ENV HADOOP_VERSION 2.7 | ||
|
||
RUN apt-get -y update && \ | ||
apt-get install --no-install-recommends -y openjdk-8-jre-headless ca-certificates-java && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
RUN cd /tmp && \ | ||
wget -q http://d3kbcqa49mib13.cloudfront.net/spark-${APACHE_SPARK_VERSION}-bin-hadoop${HADOOP_VERSION}.tgz && \ | ||
echo "7a186a2a007b2dfd880571f7214a7d329c972510a460a8bdbef9f7f2a891019343c020f74b496a61e5aa42bc9e9a79cc99defe5cb3bf8b6f49c07e01b259bc6b *spark-${APACHE_SPARK_VERSION}-bin-hadoop${HADOOP_VERSION}.tgz" | sha512sum -c - && \ | ||
tar xzf spark-${APACHE_SPARK_VERSION}-bin-hadoop${HADOOP_VERSION}.tgz -C /usr/local && \ | ||
rm spark-${APACHE_SPARK_VERSION}-bin-hadoop${HADOOP_VERSION}.tgz | ||
RUN cd /usr/local && ln -s spark-${APACHE_SPARK_VERSION}-bin-hadoop${HADOOP_VERSION} spark | ||
|
||
# Mesos dependencies | ||
RUN . /etc/os-release && \ | ||
apt-key adv --keyserver keyserver.ubuntu.com --recv E56151BF && \ | ||
DISTRO=$ID && \ | ||
CODENAME=$VERSION_CODENAME && \ | ||
echo "deb http://repos.mesosphere.io/${DISTRO} ${CODENAME} main" > /etc/apt/sources.list.d/mesosphere.list && \ | ||
apt-get -y update && \ | ||
apt-get --no-install-recommends -y --force-yes install mesos=1.2\* && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Spark and Mesos config | ||
ENV SPARK_HOME /usr/local/spark | ||
ENV PYTHONPATH $SPARK_HOME/python:$SPARK_HOME/python/lib/py4j-0.10.4-src.zip | ||
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 |