Installation for Linux and Mac OS-X users

BigARTM had been tested on several Linux and MAC distributions, and it is known to work well on

  • Ubuntu 16.04.1
  • Linux Mint 18
  • Ubuntu 14.04.5
  • Linux Mint 17.3
  • Arch Linux
  • Manjaro
  • Fedora 24
  • openSUSE Leap 42.1

To install BigARTM you should build it from source code. Or, you may run BigARTM from pre-built docker container, as described in Installation as Docker container. If you are looking for old instructions, refer to Build C++ code on Linux.

Script to install BigARTM on Ubuntu

The following script is tested with Ubuntu 14.04. Scroll further below for more OS-specific insructinos.

# Step 1. Update and install dependencies
apt-get --yes update
apt-get --yes install git make cmake build-essential libboost-all-dev

# Step 2. Insall python packages
apt-get --yes install python-numpy python-pandas python-scipy
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install protobuf tqdm wheel

# Step 3. Clone repository and build
git clone --branch=stable https://github.com/bigartm/bigartm.git
cd bigartm
mkdir build && cd build
cmake ..
make

# Step 4. Install BigARTM
make install
export ARTM_SHARED_LIBRARY=/usr/local/lib/libartm.so

# Alternative step 4 - installing only the Python package
pip install python/bigartm*.whl

Now you should be able to use BigARTM command line utility (try bigartm --help), or run BigARTM from python, like this: import artm; print(artm.version()); print(artm.ARTM(num_topics=10).info).

Step 1. Install system dependencies

Ubuntu, Linux Mint:

sudo apt-get install git build-essential libboost-all-dev
sudo apt-get install cmake  # For Ubuntu 16.04 and Linux Mint 18

For Ubuntu 14.04 and Linux Mint 17.3 ubstakk cmake from PPA:

sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo apt-get update && sudo apt-get install cmake

Arch Linux, Manjaro

Ensure that Python and base-devel packages are installed, and current user has root priveledges (e.g. can run sudo):

sudo pacman -S git boost cmake

Fedora

sudo dnf install gcc-c++ glibc-static libstdc++-static
sudo dnf install git boost boost-static cmake

openSUSE:

sudo zypper install gcc gcc-c++ glibc-devel-static git cmake

Currently openSUSE require to install Boost from sources:

sudo zypper install libbz2-devel python-devel
wget http://sourceforge.net/projects/boost/files/boost/1.60.0/boost_1_60_0.tar.gz
tar -xf boost_1_60_0.tar.gz
cd boost_1_60_0
./bootstrap.sh
./b2 link=static,shared cxxflags="-std=c++11 -fPIC"
sudo ./b2 install

Mac OS distributions

brew install git cmake boost

Step 2. Python packages

BigARTM require Python packages numpy, scipy, pandas, protobuf and tqdm. We recommend to install them with recent versino of pip.

If pip is not available, install system package python-pip or python3-pip depending on your prefered Python version. For Arch Linux and Manjaro use python2-pip and python-pip.

Verify that you use latest version of pip:

sudo pip2 install -U pip  # Python 2
sudo pip3 install -U pip  # Python 3

Then install required python packages:

sudo pip2 install -U numpy scipy pandas protobuf==3.0.0 tqdm wheel # Python 2
sudo pip3 install -U numpy scipy pandas protobuf==3.0.0 tqdm wheel # Python 3

Step 3. Build and install BigARTM library

git clone --branch=stable https://github.com/bigartm/bigartm.git
cd bigartm && mkdir build && cd build

Next step is to run cmake. The following options are available.

  • -DPYTHON=python3 - to use Python 3 instead of Python 2;
  • -DCMAKE_INSTALL_PREFIX=xxx - for custom install location instead of default /usr/local;
  • -DBoost_USE_STATIC_LIBS=ON — required on openSUSE.

Example:

cmake -DPYTHON=python3 -DCMAKE_INSTALL_PREFIX=/opt/bigartm ..

By default you may run just:

cmake ..

Now build and install the library:

make
sudo make install

Step 4. Register libartm.so / libartm.dylib

Register shared library libartm.so (or libartm.dylib):

echo /usr/local/lib | sudo tee /etc/ld.so.conf.d/artm.conf
sudo ldconfig

If you’ve installed to another location than /usr/local update the first command with new path.

As an alternative you may set up ARTM_SHARED_LIBRARY system variable

export ARTM_SHARED_LIBRARY=/usr/local/lib/libartm.so     # Linux / Unix
export ARTM_SHARED_LIBRARY=/usr/local/lib/libartm.dylib  # Mac

Step 5. Enjoy!!!

If the instructions above did not work for you please let us know, either create an issue or send e-mail to bigartm-users@googlegroups.com.