Note to Self. Installing LightGBM in Ubuntu 18.04

These are the steps I took to install Microsoft's cool Gradient Boosted Models library, LightGBM

Step 1. Install CUDA

I am not going to explain this step because it is easy to find.

Step 2. Install Boost

sudo apt-get install libboost-all-dev  

Step 3. Clone LightGBM and build with CUDA enabled

git clone --recursive https://github.com/Microsoft/LightGBM && cd LightGBM  
export CXX=g++-7 CC=gcc-7  # replace 7 with version of gcc installed on your machine  
mkdir build && cd build  
cmake .. -DUSE_GPU=1  
make -j4  

Step 4. Install python bindings

cd ..  
pip install setuptools numpy scipy scikit-learn -U  
cd python-package/  
python setup.py install --precompile  

Now you just need to add the argument device="gpu" when creatting your LightGBMModel.