PredictionIO-0.9.7-aml is that last stable version that uses the Java namespace io.prediction (look in the templates build.sbt file, it will reference io.prediction instead of org.apache.predictionio), if your template uses this you may want to install this version of PIO. We recommend that everyone move to the newer Apache version installed here.
If you are using The Universal Recommender v0.4.2, for example and for some reason can't upgrade to the Apache compatible Universal Recommender v0.5.0 follow these steps.
IMPORTANT NOTES:
-
Do not install as the "root" user. All guides assume that you have a user account that has sudo permission. You will have trouble if you install as "root". If your machine is clean do the following:
1.1 Create user for PredictionIO
aml
in each serveradduser aml # Give it some password
1.2 Give the
aml
user sudoers permissions and login to the new user. This setup assumes theaml
user as the owner of all services including Spark and Hadoop (HDFS). Do not install or run asroot
!sudo nano /etc/sudoers.d/sudo-group
Add this line to the file
# Members of the sudo group may gain root privileges # with no password (somewhat controversial) %sudo ALL=(ALL) NOPASSWD:ALL
Then save and add aml user to sudoers
sudo usermod -a -G sudo aml sudo su aml # or exit and login as the aml user cd ~ sudo service sudo restart # just to be sure permission are all active
-
You need to build pio on your machine since this sets up class caches in
~/.ivy2/...
and before you build or download you should erase the classes in that cache withrm -r ~/.ivy2
If you already have some version of PIO you should upgrade.
mv /path/to/pio pio-old
move the directory containing the old version of PredictionIO, keep it for the configuration.rm -r ~/.ivy2
This is required and will remove the old version of the local cache of classes created when building PredictionIO and templates.
ActionML has enhanced the original version of PredcitionIO v0.9.5 and has been enhancing it through several new versions. Our templates rely on these enhancements so use these installation instructions. to get the right version—do not rely on docs.prediciton.io
git clone https://github.com/actionml/PredictionIO.git pio-aml
clone to some directory. Make sure you are on the master branch or use the tag for the desired release version.git checkout master
is usually what you want.
You must build PredictionIO from source to get needed classes installed in your local cache or the Universal Recommender will not build, you will get error in pio build
. This is pretty easy:
cd /path/to/pio-aml
./make-distribution
If you have installed a recent version of PIO in the past, copy the configuration for it.
cp old-pio/conf /path/to/pio-aml
Make sure to configure all components using one of the setup guides here.
To test your installation run pio status
to make sure pio is working. Also check to make sure HDFS and and Spark are running correctly since pio status
does not check the running status of those services.
For a first-time install on a single machine. NOTE: do not install as "root"! Create a sudoer user as described above.
For a completely fresh new install, do not use the script on PredictionIO's docs site do the following:
bash -c "$(curl -s https://raw.githubusercontent.com/actionml/PredictionIO/master/bin/install.sh)"
This will create a vendors
subdirectory with needed services installed there. It will also trigger a build of PIO from source so make sure you put it in a place where you have permission to read/write.
Note: this is only for a single machine developer setup and is not advised for production.
{{> piosetupguides}}
-
The Universal Recommender
Use the installation described here. The primary exception to the quickstart is that you are using a version with the io.prediction namespace, so the UR v0.4.2 or below not the UR v0.5.0 or above, these will have build errors.
-
Build Any Template
Building a template that uses the io.prediction namespace (non-Apache PredictionIO) with the install instructions above is the same as normal:
git clone https://github-repo.git/path/to/template /path/to/template/directory cd /path/to/template/directory pio build