Created
October 16, 2016 16:04
-
-
Save geoHeil/338ccd04a3f9cc3d7ef3916fe11912c9 to your computer and use it in GitHub Desktop.
Prediction.IO v0.10.0-incubating
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
FROM openjdk:8-jdk | |
MAINTAINER geoHeil | |
# Environment variables | |
ENV PIO_VERSION 0.10.0-incubating | |
ENV SPARK_VERSION 1.6.2 | |
ENV ELASTICSEARCH_VERSION 1.7.5 | |
ENV HBASE_VERSION 1.0.3 | |
# Base paths | |
ENV PIO_HOME /PredictionIO-${PIO_VERSION} | |
ENV PATH=${PIO_HOME}/bin:$PATH | |
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64 | |
# Install other dependencies | |
RUN apt-get update && \ | |
apt-get install -y curl libgfortran3 python-pip nano | |
# create base directory | |
RUN mkdir $PIO_HOME | |
# Install prediction.io itself | |
RUN curl -O https://dist.apache.org/repos/dist/release/incubator/predictionio/${PIO_VERSION}/apache-predictionio-${PIO_VERSION}.tar.gz && \ | |
tar -xvzf apache-predictionio-${PIO_VERSION}.tar.gz -C ${PIO_HOME} && \ | |
mkdir -p ${PIO_HOME}/vendors && \ | |
rm apache-predictionio-${PIO_VERSION}.tar.gz | |
# Add prediction.io configuration | |
ADD files/pio-env.sh ${PIO_HOME}/conf/pio-env.sh | |
# Install Elasticsearch | |
RUN curl -O https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-${ELASTICSEARCH_VERSION}.tar.gz && \ | |
tar -xvzf elasticsearch-${ELASTICSEARCH_VERSION}.tar.gz -C ${PIO_HOME}/vendors && \ | |
rm elasticsearch-${ELASTICSEARCH_VERSION}.tar.gz && \ | |
echo 'cluster.name: predictionio' >> ${PIO_HOME}/vendors/elasticsearch-${ELASTICSEARCH_VERSION}/config/elasticsearch.yml && \ | |
echo 'network.host: 127.0.0.1' >> ${PIO_HOME}/vendors/elasticsearch-${ELASTICSEARCH_VERSION}/config/elasticsearch.yml | |
# Install HBase | |
RUN curl -O http://archive.apache.org/dist/hbase/hbase-${HBASE_VERSION}/hbase-${HBASE_VERSION}-bin.tar.gz && \ | |
tar -xvzf hbase-${HBASE_VERSION}-bin.tar.gz -C ${PIO_HOME}/vendors && \ | |
rm hbase-${HBASE_VERSION}-bin.tar.gz && \ | |
rm -rf ${PIO_HOME}/vendors/hbase-${HBASE_VERSION}/docs | |
# Add HBase configuration template | |
ADD files/hbase-site.xml ${PIO_HOME}/vendors/hbase-${HBASE_VERSION}/conf/hbase-site.xml | |
# Configure HBase configuration template | |
RUN sed -i "s|%%PIO_HOME%%|${PIO_HOME}|" ${PIO_HOME}/vendors/hbase-${HBASE_VERSION}/conf/hbase-site.xml && \ | |
sed -i "s|%%HBASE_VERSION%%|${HBASE_VERSION}|" ${PIO_HOME}/vendors/hbase-${HBASE_VERSION}/conf/hbase-site.xml | |
# Install Spark | |
RUN curl -O http://d3kbcqa49mib13.cloudfront.net/spark-${SPARK_VERSION}-bin-hadoop2.6.tgz && \ | |
tar -xvzf spark-${SPARK_VERSION}-bin-hadoop2.6.tgz -C ${PIO_HOME}/vendors && \ | |
rm spark-${SPARK_VERSION}-bin-hadoop2.6.tgz && \ | |
rm -rf ${PIO_HOME}/vendors/spark-${SPARK_VERSION}-bin-hadoop2.6/examples | |
# Triggers fetching the complete sbt environment | |
RUN ${PIO_HOME}/apache-predictionio-${PIO_VERSION}/sbt/sbt -batch | |
# Add scripts | |
ADD files/deploy_engine.sh . | |
ADD files/entrypoint.sh . | |
RUN chmod +x entrypoint.sh && chmod +x deploy_engine.sh | |
# Expose HTTP ports (event server and recommendation server) | |
EXPOSE 7070 8000 | |
# Entrypoint definition -> Run services | |
ENTRYPOINT ["/entrypoint.sh"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a port from https://github.com/tobilg/docker-predictionio to try to install the latest 0.10.0-incubating release
There is a problem with this - it seems to get stuck on
edit
after a long while I see the error: