Skip to content

Commit a0b99e9

Browse files
committed
Update version 0.11.0-incubating.
1 parent e090871 commit a0b99e9

File tree

3 files changed

+27
-19
lines changed

3 files changed

+27
-19
lines changed

Dockerfile

+21-14
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
FROM ubuntu
22
MAINTAINER shimamoto
33

4-
ENV PIO_VERSION 0.11.0-v1-SNAPSHOT
5-
ENV SPARK_VERSION 1.6.3
6-
ENV ELASTICSEARCH_VERSION 1.7.6
4+
ENV PIO_VERSION 0.11.0-incubating
5+
ENV SPARK_VERSION 2.1.0
6+
ENV HADOOP_VERSION hadoop2.7
7+
ENV ELASTICSEARCH_VERSION 5.3.1
78
ENV HBASE_VERSION 1.0.0
89

910
ENV PIO_HOME /PredictionIO-${PIO_VERSION}
@@ -15,21 +16,23 @@ RUN apt-get update \
1516
&& apt-get clean \
1617
&& rm -rf /var/lib/apt/lists/*
1718

18-
RUN cd / \
19-
&& git clone https://github.com/jpioug/incubator-predictionio.git \
20-
&& cd incubator-predictionio \
21-
&& ./make-distribution.sh
19+
RUN curl -O http://mirror.nexcess.net/apache/incubator/predictionio/${PIO_VERSION}/apache-predictionio-${PIO_VERSION}.tar.gz \
20+
&& mkdir /apache-predictionio-${PIO_VERSION} \
21+
&& tar -xvzf apache-predictionio-${PIO_VERSION}.tar.gz -C /apache-predictionio-${PIO_VERSION} \
22+
&& rm apache-predictionio-${PIO_VERSION}.tar.gz \
23+
&& cd apache-predictionio-${PIO_VERSION} \
24+
&& ./make-distribution.sh -Dscala.version=2.11.8 -Dspark.version=${SPARK_VERSION} -Delasticsearch.version=${ELASTICSEARCH_VERSION}
2225

23-
RUN tar zxvf /incubator-predictionio/PredictionIO-${PIO_VERSION}.tar.gz -C /
24-
RUN rm -r /incubator-predictionio
25-
RUN mkdir /${PIO_HOME}/vendors
26+
RUN tar zxvf /apache-predictionio-${PIO_VERSION}/PredictionIO-${PIO_VERSION}.tar.gz -C /
27+
RUN rm -r /apache-predictionio-${PIO_VERSION}
28+
RUN mkdir ${PIO_HOME}/vendors
2629
COPY files/pio-env.sh ${PIO_HOME}/conf/pio-env.sh
2730

28-
RUN curl -O http://d3kbcqa49mib13.cloudfront.net/spark-${SPARK_VERSION}-bin-hadoop2.6.tgz \
29-
&& tar -xvzf spark-${SPARK_VERSION}-bin-hadoop2.6.tgz -C ${PIO_HOME}/vendors \
30-
&& rm spark-${SPARK_VERSION}-bin-hadoop2.6.tgz
31+
RUN curl -O http://d3kbcqa49mib13.cloudfront.net/spark-${SPARK_VERSION}-bin-${HADOOP_VERSION}.tgz \
32+
&& tar -xvzf spark-${SPARK_VERSION}-bin-${HADOOP_VERSION}.tgz -C ${PIO_HOME}/vendors \
33+
&& rm spark-${SPARK_VERSION}-bin-${HADOOP_VERSION}.tgz
3134

32-
RUN curl -O https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-${ELASTICSEARCH_VERSION}.tar.gz \
35+
RUN curl -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ELASTICSEARCH_VERSION}.tar.gz \
3336
&& tar -xvzf elasticsearch-${ELASTICSEARCH_VERSION}.tar.gz -C ${PIO_HOME}/vendors \
3437
&& rm elasticsearch-${ELASTICSEARCH_VERSION}.tar.gz \
3538
&& echo 'cluster.name: predictionio' >> ${PIO_HOME}/vendors/elasticsearch-${ELASTICSEARCH_VERSION}/config/elasticsearch.yml \
@@ -41,3 +44,7 @@ RUN curl -O http://archive.apache.org/dist/hbase/hbase-${HBASE_VERSION}/hbase-${
4144
COPY files/hbase-site.xml ${PIO_HOME}/vendors/hbase-${HBASE_VERSION}/conf/hbase-site.xml
4245
RUN sed -i "s|VAR_PIO_HOME|${PIO_HOME}|" ${PIO_HOME}/vendors/hbase-${HBASE_VERSION}/conf/hbase-site.xml \
4346
&& sed -i "s|VAR_HBASE_VERSION|${HBASE_VERSION}|" ${PIO_HOME}/vendors/hbase-${HBASE_VERSION}/conf/hbase-site.xml
47+
48+
RUN groupadd -r pio --gid=999 \
49+
&& useradd -r -g pio --uid=999 -m pio \
50+
&& chown -R pio:pio ${PIO_HOME}

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Docker container for PredictionIO-based machine learning services
33

44
This container uses Apache Spark, HBase and Elasticsearch.
5-
The PredictionIO version is [jpioug](https://github.com/jpioug) version.
5+
The PredictionIO version is 0.11.0-incubating.
66

77
### Use it interactively for development:
88
1. First, build docker image from local Dockerfile: cd to the path containing the Dockerfile, then:
@@ -16,6 +16,7 @@ $ docker run -p 8000:8000 --name predictionio_instance -it predictionio /bin/bas
1616

1717
2. Then in docker container, start all services and check they are started
1818
```Bash
19-
$ pio-start-all
20-
$ jps -l
19+
root@...:/# su pio
20+
pio@...:/$ pio-start-all
21+
pio@...:/$ jps -l
2122
```

files/pio-env.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ PIO_FS_BASEDIR=${HOME}/.pio_store
44
PIO_FS_ENGINESDIR=${PIO_FS_BASEDIR}/engines
55
PIO_FS_TMPDIR=${PIO_FS_BASEDIR}/tmp
66

7-
SPARK_HOME=${PIO_HOME}/vendors/spark-${SPARK_VERSION}-bin-hadoop2.6
7+
SPARK_HOME=${PIO_HOME}/vendors/spark-${SPARK_VERSION}-bin-${HADOOP_VERSION}
88

99
HBASE_CONF_DIR=${PIO_HOME}/vendors/hbase-${HBASE_VERSION}/conf
1010

@@ -18,7 +18,7 @@ PIO_STORAGE_REPOSITORIES_MODELDATA_SOURCE=LOCALFS
1818
PIO_STORAGE_SOURCES_ELASTICSEARCH_TYPE=elasticsearch
1919
PIO_STORAGE_SOURCES_ELASTICSEARCH_CLUSTERNAME=predictionio
2020
PIO_STORAGE_SOURCES_ELASTICSEARCH_HOSTS=localhost
21-
PIO_STORAGE_SOURCES_ELASTICSEARCH_PORTS=9300
21+
PIO_STORAGE_SOURCES_ELASTICSEARCH_PORTS=9200
2222
PIO_STORAGE_SOURCES_ELASTICSEARCH_HOME=${PIO_HOME}/vendors/elasticsearch-${ELASTICSEARCH_VERSION}
2323
PIO_STORAGE_SOURCES_LOCALFS_TYPE=localfs
2424
PIO_STORAGE_SOURCES_LOCALFS_PATH=${PIO_FS_BASEDIR}/models

0 commit comments

Comments
 (0)