If you haven't done so already, make sure that all submodules are up-to-date:
$ git submodule update --init
The build process is managed by cmake of which you need at least version 3.
All packages except for the vigra library and the Gurobi solver can be installed using the default Ubuntu repositories for your release:
Note that SOPNET now requires Boost >= 1.49.0 (for C++11 compatibility), which is not available from the default Ubuntu 12.04 respositories. Make sure your version of Boost includes libboost-timer-dev. Optional HDF5 support is enabled if you have libhdf5-serial- dev installed.
A recent version of vigra will be downloaded and compiled automatically.
To compile the python wrappers (pysopnet), you need additionally:
- libboost-python-dev
- libpython-dev
Instructions are available for installing dependencies for Scientific Linux 6.5. Python-sopnet also compiles in MacOS X, but dependencies must be found through Homebrew or Macports.
Download and unpack the Gurobi solver, request a licence (academic licences are free). Run
$ ./grbgetkey <your-licence-id>
in the gurobi bin directory from an academic domain to download the license file
(gurobi.lic
). Make sure the environment variable GRB_LICENCE_FILE
points to
it. Set the cmake variable Gurobi_ROOT_DIR
to the path containing the lib and
bin directory or set the environment variable GUROBI_ROOT_DIR
accordingly
before calling cmake.
If you are just interested in the python wrappers, it is enough to call
$ python setup.py install
from the repository's main directory. This will launch cmake and install the wrappers, given that all dependencies are fulfilled. You might have to run the above command as root to install the wrappers in the python system directory.
For a standard build, create a build directory (e.g., ./build
), change into it
and type
$ cmake [path_to_sopnet_directory (e.g. '..')]
Cmake will try to find the required packages and tell you which ones are missing. After cmake finishes without errors, run
$ make
Python-sopnet compiles in gcc, clang, and icc.