Saturday, October 8, 2011

Installing GraphLab on Ubuntu

[ Note: this blog post was updated on 10/28/2012 to conform with GraphLab v2.1 ]

Recently I am spending more and more time giving supports to people who are installing Graphlab on ubuntu. Installation should be rather simple. The directions below are for Ubuntu Natty (11.04)

0) Login into your ubuntu machine (64 bit).
On amazon EC2 - you can launch instance AMI-e9965180

1) Installing libboost
sudo apt-get update
sudo apt-get install zlib1g-dev libbz2-dev
sudo apt-get install build-essential
sudo apt-get install libboost1.42-all-dev

2) Install Git
sudo apt-get install git

3) Install cmake
sudo apt-get install cmake

4) Install Java+openmpi

sudo apt-get install libopenmpi-dev openmpi-bin default-jdk

5) Install graphlab from git
Go to graphlab download page, and follow the download link to the mercurial repository.
copy the command string: "git clone..." and execute it in your ubuntu shell.

Note: After you cloned the repository and you would like to get up to date,
you can issue the commands:
git pull



6) configure and compile - for GraphLab version 2.1

cd graphlab
./configure
cd release/toolkits/collaborative_filtering/    # for example, if you want to compile the cf toolkit
make -j4


7) Optional: install Octave.
If you don't have access to Matlab, Octave is an open source replacement. Octave is useful for preparing input formats to GraphLab's collaborative filtering library and reading the output.
You can install Octave using the command:
sudo apt-get install octave3.2

Let me know how it went!

Note: from Clive Cox, RummbleLabs.com : For Ubuntu Lucid add the following:
sudo add-apt-repository ppa:lucid-bleed/ppa
sudo apt-get update

Thanks to Yifu Diao, for his great comments!

16 comments:

  1. Just finished setting up with Ubuntu 11.10, libboost 1.46, and libitpp7. Thanks very much for the guide.

    Mike

    ReplyDelete
  2. Thanks for the feedback!! Would you mind sending me the exact commands? Some users have trouble with 11.10 and I did not fully figure out the installation there. (You can view the exact commands using "history").

    ReplyDelete
  3. I have installed GraphLab on Ubuntu 11.10 64bit.
    Following the instructions in "http://select.cs.cmu.edu/code/graphlab/download.html"
    1- I installed Boost, CMake and Kyoto Cabinet
    2- The configuration was done using:
    ./configure --bootstrap --eigen
    3- And finally the compilation using:
    cd release/
    make -j4

    Best regards
    Alireza

    ReplyDelete
  4. Hi, Thanks for the feedback! Did you manage to run the unit tests (Section 7)?

    ReplyDelete
  5. Hi, the unit and application tests are done successfully. I didn't install MPICH and therefore the RPC test is not accomplished.

    Cheers
    Alireza

    ReplyDelete
  6. Very cool! Would you mind sharing a bit more where are you from and what are you working on?

    ReplyDelete
  7. This procedure works great with Ubuntu 11.10 64bit version as well. :)

    ReplyDelete
  8. Works like a charm also on a bit older Ubuntu 10.10.

    ReplyDelete
  9. works fine on Ubuntu 10.04 LTS and passed all the unit tests.
    I'm working in computer vision and looking forward to building things on top of it to facilitate large-scale learning. Thanks for making it publicly accessible...

    ReplyDelete
    Replies
    1. Hi Ning!
      Thanks for the update. Would love to help as needed!!

      Delete
  10. Not sure for other versions but for 12.04 libboost1.48 is the package available.
    I think 1.42 is no longer available as debian

    ReplyDelete
    Replies
    1. Yes. On ubuntu 12.04,
      sudo apt-get install libboost1.42-all-dev
      gives
      E: Unable to locate package libboost1.42-all-dev

      Delete
  11. thanks for these instructions danny

    ReplyDelete
  12. Hello!

    I'm trying to install graphlab on ubuntu 12.04

    Thanks to Mohit's comment - libboost1.48 passed well



    However hyperlinks in 5а) and 5b) leads to 404 page not found. :(

    Need your advice or good link.
    Thank you!

    ReplyDelete
    Replies
    1. Hi Alexandr!
      I fixed the links - they point now to graphlab 2.1
      I also advise looking at graphchi: http://graphchi.org/
      which now replaces the multicore graphlab 1.

      Delete