ARG R_VERSION=latest
FROM rocker/verse:${R_VERSION}

WORKDIR /lgbm

RUN apt-get update && \
    apt-get install -y build-essential cmake && \
    git clone --recursive --branch stable --depth 1 https://github.com/Microsoft/LightGBM && \
    cd LightGBM && \
    Rscript build_r.R
