Skip to content

Latest commit

 

History

History
76 lines (56 loc) · 2.24 KB

QUICKSTART.md

File metadata and controls

76 lines (56 loc) · 2.24 KB

SHOGUN-TOOLBOX Quickstart

This quickstart assumes that you have access to standard unix/linux tools, cmake and a C/C++ compiler. It may be neccessary to install additional libraries or header files to compile shogun or its interfaces.

Build prerequisites

  • Minimal requirements: standard utils like cmake, gcc/g++/clang, ldd, wget/curl, tar/bzip2, bash, grep, test, sed, cut, awk, ldd, uname, cat, python-2.7
  • Optional libraries to improve performance: lapack3-dev, atlas3-headers, atlas3-base-dev, libeigen3-dev
  • Depending on the enabled interfaces you may need: swig 2, r-base-dev, liboctave-dev, openjdk-6-jdk/openjdk-7-jdk, jblas, jblas-dev, python2.7-dev, python-numpy

Download sources

The following commands will clone the shogun repository and download approximately 350-400 MB of data.

$ wget ftp://shogun-toolbox.org/shogun/releases/3.1/sources/shogun-3.1.1.tar.bz2
$ tar xjf shogun-3.1.1.tar.bz2

$ wget ftp://shogun-toolbox.org/shogun/data/shogun-data-0.7.tar.bz2
$ shogun-data-0.7.tar.bz2

$ rm data/
$ ln -s ../shogun-data-0.7 data

Compile and install SHOGUN-TOOLBOX into home directory

$ cd shogun-3.1.1

$ mkdir build
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX="/home/$USER/shogun-install" ..

$ make -j5 all 
$ make install

Run the examples:

$ export LD_LIBRARY_PATH="/home/$USER/shogun-install/lib:$LD_LIBRARY_PATH"
$ cd "/home/$USER/share/shogun/examples/libshogun"
$ chmod +x ./so_multiclass_BMRM && ./so_multiclass_BMRM

You know what you're doing: More build options

Enabling modular interfaces

  • -DPythonModular=ON, -DOctaveModular=ON, -DJavaModular=ON,
  • -DPerlModular=ON, -DRubyModular=ON, -DCSharpModular=ON,
  • -DRModular=ON, -DLuaModular=ON

Enabling static interfaces (legacy)

  • -DCmdLineStatic=ON, -DPythonStatic=ON, -DOctaveStatic=ON
  • -DMatlabStatic=ON, -DRStatic=ON

Handy cmake options

  • -DCMAKE_BUILD_TYPE=Debug or -DCMAKE_BUILD_TYPE=Release
  • -DENABLE_TESTING=ON or -DENABLE_TESTING=OFF
  • -DCMAKE_INCLUDE_PATH=...
  • -DCMAKE_LIBRARY_PATH=...

Got stuck? Found a bug? Need help?