Docker container for the latest prediction.io version with most recent dependencies
1.4K
PredictionIO is an open-source Machine Learning server for developers and data scientists to build and deploy predictive applications in a fraction of the time.
As of 2016-06-15 this container has the following applications installed:
To run the basic container, without a template yet deployed:
$ docker run -d -p 7070:7070 -p 8000:8000 tobilg/predictionio
This starts the event server and the PredictionIO engine and webservice. To deploy an engine while running, open a Bash shell via
$ docker exec -it <containerid> bash
Then, follow the steps after step 2 in the quickstart tutorial
To use the basic container with a preconfigured custom engine, map the engine's directory to the containers /CustomEngine folder, and run the ./deploy_engine.sh script.
So, if your engine resides in the ~/engines/myCustomEngine folder, you can use
$ docker run -d -p 7070:7070 -p 8000:8000 -v ~/engines/myCustomEngine:/CustomEngine tobilg/predictionio
to map it in the container. Please don't forget to run ./deploy_engine.sh script after connecting into the running container (see Basic).
You can create a custom Dockerfile if you want to include and deploy you custom engine with the container itself. If your custom engine resides in ~/engines/myCustomEngine, create the following Dockerfile in the same folder:
FROM tobilg/predictionio
ADD . /CustomEngine
RUN ./deploy_engine.sh
EXPOSE 7070 8000
ENTRYPOINT ["/PredictionIO-0.9.6/bin/pio-start-all"]
To run the container with Marathon on Mesos with bridge networking, issue the following command (replace <MarathonServer> with an actual IP or hostname):
curl -H "Content-Type: application/json" -XPOST 'http://<MarathonServer>:8080/v2/apps' -d '{
"id": "predictionio-server",
"container": {
"docker": {
"image": "tobilg/predictionio",
"network": "BRIDGE",
"portMappings": [
{ "containerPort": 7070 },
{ "containerPort": 8000 }
]
},
"type": "DOCKER"
},
"cpus": 4,
"mem": 8192,
"instances": 1
}'
You'll have to have a look at the launched task to see where the container is actually launched, or use a service discovery tool such as Mesos DNS.
If you want to use static ports, you have to use HOST networking like this:
curl -H "Content-Type: application/json" -XPOST 'http://<MarathonServer>:8080/v2/apps' -d '{
"id": "predictionio-server",
"container": {
"docker": {
"image": "tobilg/predictionio",
"network": "HOST"
},
"type": "DOCKER"
},
"cpus": 4,
"mem": 8192,
"instances": 1,
"ports": [7070, 8000]
}'
Content type
Image
Digest
Size
844.1 MB
Last updated
about 10 years ago
docker pull tobilg/predictionio