mingfang/docker-predictionio

Upgrade to Install Script

Closed this issue · 7 comments

Hi I am a developer at PredictionIO.

I just wanted to let you know we rolled out an install script. We are testing it to make sure it's Docker compatible but it could simplify your docker install a lot.

I have tested it with a 2 line Dockerfile

RUN apt-get install -y curl
RUN bash -c "$(curl -s http://install.prediction.io/install.sh)"

http://install.prediction.io/install.sh is our hosted install script. We are trying to move everyone in the direction of using the script to standardize installing PredictionIO and to make moving form version to version easier. If you have any feedback on the script itself we are very open to it.

I just did a quick test but am stuck at Downloading PredictionIO...
Think there is a problem with the site at the moment. Will try again tomorrow.

In the meantime, what are your thoughts about the choice of process manager?
I normally use Runit, but Supervisord can also be an option.
Let me know and I can set that up too.

I will check the download site. I noticed in my docker files download but the progress does not reliably update so it looks like they are hung but then a few minutes latter just work. Not really sure why this is but it's annoying to say the least.

I don't have any preference on process managers. Honestly Docker is not my area of expertise so I am open to whatever you think is best.

After using the install script you must set the following via a CMD script or ENV variables in docker for this to work as they are wiped out when rerunning the container. This of course, in addition to the process manager mentioned by @mingfang

JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
export JAVA_HOME
PIO_HOME=/root/PredictionIO
export PIO_HOME
SPARK_HOME=/root/PredictionIO/vendors/spark-1.2.0
export SPARK_HOME
PATH=$PATH:/root/PredictionIO/bin
export PATH

Then you can run:
pio-start-all
pio status

I just pushed a few enhancements to the Dockerfile.
1-Upgraded to PredictionIO v0.90.0
2-fixed the download progress printout
3-upgraded to ES 1.4.4

Note I also removed the quick start for now until I can get it working again.

Also please don't use pio-start-all when using this Dockerfile.
It uses Runit to manage all the processes.
Use runsvdir-start& instead.

Just a heads up, I'm using the install script mentioned by @ramaboo + supervisor in a sandbox https://github.com/andyg5000/docker-predictionio

Awesome!

I've decided no to use this script since what I have is working already.