Skip to content

Commit 4da0570

Browse files
author
Soeren Sonnenburg
committed
Merge pull request #1867 from tklein23/develop
Added first draft of "quickstart" instructions to documentation.
2 parents c0cac55 + 49cdf0c commit 4da0570

File tree

1 file changed

+95
-0
lines changed

1 file changed

+95
-0
lines changed

doc/md/QUICKSTART.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# SHOGUN-TOOLBOX Quickstart
2+
3+
This quickstart assumes that you have access to standard unix/linux tools,
4+
cmake and a C/C++ compiler. It may be neccessary to install additional
5+
libraries or header files to compile shogun or its interfaces.
6+
7+
## Build prerequisites
8+
9+
* Minimal requirements: standard utils like cmake, gcc/g++/clang, ldd,
10+
wget/curl, tar/bzip2, bash, grep, test, sed, cut, awk, ldd, uname, cat,
11+
python-2.7
12+
* Optional libraries to improve performance: lapack3-dev, atlas3-headers,
13+
atlas3-base-dev, libeigen3-dev
14+
* Depending on the enabled interfaces you may need: swig 2, r-base-dev,
15+
liboctave-dev, openjdk-6-jdk/openjdk-7-jdk, jblas, jblas-dev,
16+
python2.7-dev, python-numpy
17+
18+
## Download sources
19+
20+
The following commands will get the prepared shogun source archives. Note
21+
that some examples might depend on "shogun-data", which is approximately
22+
250 MB of data to be downloaded. The additional data is not required for
23+
shogun itself, so you may skip downloading them.
24+
25+
```
26+
27+
$ cd "$HOME"
28+
$ wget ftp://shogun-toolbox.org/shogun/releases/3.1/sources/shogun-3.1.1.tar.bz2
29+
$ tar xjf shogun-3.1.1.tar.bz2
30+
31+
$ wget ftp://shogun-toolbox.org/shogun/data/shogun-data-0.7.tar.bz2
32+
$ tar xjf shogun-data-0.7.tar.bz2
33+
34+
$ cd shogun-3.1.1
35+
$ rm -rv data/
36+
$ ln -s ../shogun-data-0.7 data
37+
```
38+
39+
## Compile and install SHOGUN-TOOLBOX into home directory
40+
41+
We assume that you want to install shogun in a subdirectory `shogun-install` of
42+
your user home. Installing shogun to system-directories is possible as well,
43+
but may require root/sudo privileges.
44+
45+
```
46+
47+
$ cd "$HOME/shogun-3.1.1"
48+
49+
$ mkdir build
50+
$ cd build
51+
$ cmake -DCMAKE_INSTALL_PREFIX="$HOME/shogun-install" ..
52+
53+
$ make -j5 all
54+
$ make install
55+
```
56+
57+
## Run the examples
58+
59+
Many toy examples on can be found within `share/shogun/examples/libshogun`.
60+
In order to run them, you need to point `LD_LIBRARY_PATH` to the location
61+
of the compiled library. If everything from above was successful, this
62+
should work well:
63+
64+
```
65+
66+
$ export LD_LIBRARY_PATH="$HOME/shogun-install/lib:$LD_LIBRARY_PATH"
67+
$ cd "$HOME/shogun-install/share/shogun/examples/libshogun"
68+
$ chmod +x ./so_multiclass_BMRM && ./so_multiclass_BMRM
69+
```
70+
71+
# You know what you're doing?
72+
73+
A small cheat sheet of available cmake options. This list does not
74+
claim to be comprehensive -- it's meant to be a quick reference for
75+
those you know what they do.
76+
77+
## Enabling modular interfaces
78+
* `-DPythonModular=ON`, `-DOctaveModular=ON`, `-DJavaModular=ON`,
79+
* `-DPerlModular=ON`, `-DRubyModular=ON`, `-DCSharpModular=ON`,
80+
* `-DRModular=ON`, `-DLuaModular=ON`
81+
82+
## Enabling static interfaces (legacy)
83+
* `-DCmdLineStatic=ON`, `-DPythonStatic=ON`, `-DOctaveStatic=ON`
84+
* `-DMatlabStatic=ON`, `-DRStatic=ON`
85+
86+
## Handy cmake options
87+
* `-DCMAKE_BUILD_TYPE=Debug` or `-DCMAKE_BUILD_TYPE=Release`
88+
* `-DENABLE_TESTING=ON` or `-DENABLE_TESTING=OFF`
89+
* `-DCMAKE_INCLUDE_PATH=...`, `-DCMAKE_LIBRARY_PATH=...`
90+
91+
# Got stuck? Found a bug? Need help?
92+
93+
* Bug tracker: https://github.com/shogun-toolbox/shogun/issues
94+
* Chat: Join IRC channel #shogun at irc.freenode.net
95+
* Mailing list: Send an empty message to shogun-list-subscribe@shogun-toolbox.org

0 commit comments

Comments
 (0)