dockerfile-python 868 Bytes
Newer Older
wxchan's avatar
wxchan committed
1
2
3
FROM ubuntu:16.04

RUN apt-get update && \
Nikita Titov's avatar
Nikita Titov committed
4
5
6
7
8
9
10
    apt-get install -y --no-install-recommends \
        cmake \
        build-essential \
        gcc \
        g++ \
        git \
        wget && \
wxchan's avatar
wxchan committed
11
12
13
14
15
16

# python-package
    # miniconda
    wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
    /bin/bash Miniconda3-latest-Linux-x86_64.sh -f -b -p /opt/conda && \
    export PATH="/opt/conda/bin:$PATH" && \
Nikita Titov's avatar
Nikita Titov committed
17
    conda config --set always_yes yes --set changeps1 no && \
wxchan's avatar
wxchan committed
18
    # lightgbm
Nikita Titov's avatar
Nikita Titov committed
19
20
    conda install -q -y numpy scipy scikit-learn pandas && \
    git clone --recursive --branch stable --depth 1 https://github.com/Microsoft/LightGBM && \
Guolin Ke's avatar
Guolin Ke committed
21
    cd LightGBM/python-package && python setup.py install && \
wxchan's avatar
wxchan committed
22
23
24

# clean
    apt-get autoremove -y && apt-get clean && \
Nikita Titov's avatar
Nikita Titov committed
25
    conda clean -a -y && \
wxchan's avatar
wxchan committed
26
27
28
    rm -rf /usr/local/src/*

ENV PATH /opt/conda/bin:$PATH