vowpal_wabbit icon indicating copy to clipboard operation
vowpal_wabbit copied to clipboard

Improve documentation for building on other Linux distros and CentOS

Open aburkov opened this issue 4 years ago • 8 comments

Short description

There's no information on how to install VW on AWS Linux (or CentOS). I tried to build from the source by looking at the instructions for Ubuntu but had no luck.

How this suggestion will help you/others

Me and others working on AWS Linux and Red Hat/CentOS will be able to use VW.

aburkov avatar Feb 21 '21 03:02 aburkov

By the way, the documentation is very misleading. The webpage https://vowpalwabbit.org/ says that one has to run "pip install vowpalwabbit" to install VW, however it only installs Python bindings. At the same time, the page https://vowpalwabbit.org/tutorials/getting_started.html shows how to work on the command line with the vw command, which is not installed with "pip install vowpalwabbit".

VW is a great library when you have it installed. But it takes a great level of skill (and luck) to get it installed.

aburkov avatar Feb 21 '21 04:02 aburkov

There are many different linux distros out there so it is difficult to provide instructions for each. Since Ubuntu is (probably) the most common, most projects will at least provide instructions for that with the assumption that users of other distros can adapt the instructions to the relevant package managers etc. What was the specific issue you had when building for CentOS? We can certainly help out.

You're 100% right on the getting started tutorial being confusing given how it is presented after the installation in the getting started module. We need to adapt the tutorials that are presented based on which language is selected to ensure it is relevant. There is an existing issue to track this: https://github.com/VowpalWabbit/vowpalwabbit.github.io/issues/153. Do you think this resolves the concern or is there more to it? I certainly understand that usability and docs are things that need work

jackgerrits avatar Feb 21 '21 04:02 jackgerrits

I have got multiple issues on CentOS, the critical of which (that made me abandon it) were the inability of the vw make script to detect boost and flatbuffers even if those were installed. I managed to remove the dependency on flatbuffers by using -DBUILD_FLATBUFFERS=OFF but the boost problem could not be fixed. You should try it yourself by renting a free instance of AWS Linux VM. I understand that you cannot support all Linux distros, but apt and yum are the most popular package managers, so you will get a huge number of happy users if they can simply "apt-get install vw" or "yum install vw".

By the way, building from the source on Ubuntu didn't work either. I started here https://github.com/VowpalWabbit/vowpal_wabbit/wiki/Dependencies and executed all steps for Ubuntu, then clicked on "Next step: building on Linux" which brought me to https://github.com/VowpalWabbit/vowpal_wabbit/wiki/Building#linux where the page says: "On most systems, from the build directory, you should be able to build with: make" but there's no "build" subdirectory in the where I currently am (the directory vowpal_wabbit obtained by cloning from git). There's "build_dir" under flatbuffers-1.12.0 but make from there doesn't install vw.

aburkov avatar Feb 22 '21 04:02 aburkov

Hello @aburkov you are right, have amended the documentation under Building for linux

From the vowpal_wabbit directory you need to do:

mkdir build
cd build
cmake .. -DBUILD_FLATBUFFERS=OFF
make

on the cmake step you should define any other flags that you might want

olgavrou avatar Feb 22 '21 11:02 olgavrou

It is also a good idea to refer to the scripts that build VW on CI.

script: https://github.com/VowpalWabbit/vowpal_wabbit/blob/master/.scripts/linux/build-minimal.sh

on top of this image with the depedencies: https://github.com/VowpalWabbit/docker-images/blob/master/vowpal_wabbit/ubuntu1604-build.Dockerfile

lalo avatar Feb 24 '21 17:02 lalo

It's also worth mentioning that the Java Jars are produced on a CentOS image: https://github.com/VowpalWabbit/docker-images/blob/master/vowpal_wabbit/centos7_6_1810-build.Dockerfile

Build script here: https://github.com/VowpalWabbit/vowpal_wabbit/blob/master/.scripts/linux/build-static-java.sh

jackgerrits avatar Feb 25 '21 16:02 jackgerrits

I think using vcpkg as described here would be the easiest path forward for usage on CentOS

jackgerrits avatar Jul 29 '22 19:07 jackgerrits

Any help anyone is willing to provide on improving instructions for building on various distros would be welcome.

The correct location for such info would be here: https://github.com/VowpalWabbit/vowpal_wabbit/wiki/Building#option-3-using-system-dependencies

jackgerrits avatar Dec 28 '22 20:12 jackgerrits