Skip to content
Permalink
Browse files

Update dockerfile

  • Loading branch information...
mhamilton723 committed Jul 5, 2019
1 parent 637df9d commit fb3e99e53d46ef5536dd2fa765e25b3d7ded07d8
@@ -11,7 +11,7 @@ name := "mmlspark"
organization := "com.microsoft.ml.spark"
scalaVersion := "2.11.12"

val sparkVersion = "2.4.0"
val sparkVersion = "2.4.3"
val sprayVersion = "1.3.4"
val cntkVersion = "2.4"

@@ -1,7 +1,7 @@
name: mmlspark
dependencies:
- python=3.6
- pyspark=2.4.1
- pyspark=2.4.3
- requests
- pip:
- unittest-xml-reporting
@@ -0,0 +1,38 @@
FROM ubuntu:16.04

ARG SPARK_VERSION=2.4.3
RUN apt-get -qq update && apt-get -qq -y install curl bzip2 \
&& curl -sSL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o /tmp/miniconda.sh \
&& bash /tmp/miniconda.sh -bfp /usr/local \
&& rm -rf /tmp/miniconda.sh \
&& conda install -y python=3 \
&& conda update conda \
&& apt-get install default-jre -y \
&& conda install pyspark=${SPARK_VERSION} \
&& apt-get -qq -y remove curl bzip2 \
&& apt-get -qq -y autoremove \
&& apt-get autoclean \
&& rm -rf /var/lib/apt/lists/* /var/log/dpkg.log \
&& conda clean --all --yes

ENV PATH /opt/conda/bin:$PATH
ENV JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk-amd64

RUN conda install jupyter \
&& jupyter-notebook --generate-config \
&& ipython profile create \
&& echo "c.NotebookApp.token = ''" >> ~/.jupyter/jupyter_notebook_config.py \
&& echo "c.NotebookApp.ip = '0.0.0.0'" >> ~/.jupyter/jupyter_notebook_config.py \
&& echo "c.NotebookApp.allow_root = True" >> ~/.jupyter/jupyter_notebook_config.py \
&& apt-get -qq -y autoremove \
&& apt-get autoclean \
&& rm -rf /var/lib/apt/lists/* /var/log/dpkg.log \
&& conda clean --all --yes

ADD tools/docker/demo/init_notebook.py /root/.ipython/profile_default/startup
ADD notebooks/samples notebooks
WORKDIR notebooks

ARG MMLSPARK_VERSION=0.17
ENV MMLSPARK_VERSION=${MMLSPARK_VERSION}
EXPOSE 8888
@@ -0,0 +1,9 @@
from pyspark.sql import SparkSession
import os
spark = SparkSession.builder \
.master("local[*]") \
.appName("MMLSpark Docker App") \
.config("spark.jars.packages", "com.microsoft.ml.spark:mmlspark_2.11:" + os.environ["MMLSPARK_VERSION"]) \
.config("spark.jars.repositories", "https://mmlspark.azureedge.net/maven") \
.getOrCreate()
sc = spark.sparkContext
File renamed without changes.
@@ -0,0 +1,19 @@
FROM ubuntu:16.04

ARG SPARK_VERSION=2.4.3
RUN apt-get -qq update && apt-get -qq -y install curl bzip2 \
&& curl -sSL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o /tmp/miniconda.sh \
&& bash /tmp/miniconda.sh -bfp /usr/local \
&& rm -rf /tmp/miniconda.sh \
&& conda install -y python=3 \
&& conda update conda \
&& apt-get install default-jre -y \
&& conda install pyspark=${SPARK_VERSION} \
&& apt-get -qq -y remove curl bzip2 \
&& apt-get -qq -y autoremove \
&& apt-get autoclean \
&& rm -rf /var/lib/apt/lists/* /var/log/dpkg.log \
&& conda clean --all --yes

ENV PATH /opt/conda/bin:$PATH
ENV JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk-amd64

0 comments on commit fb3e99e

Please sign in to comment.
You can’t perform that action at this time.