github.com/kubeflow/training-operator@v1.7.0/examples/xgboost/lightgbm-dist/Dockerfile (about)

     1  FROM ubuntu:16.04
     2  
     3  ARG CONDA_DIR=/opt/conda
     4  ENV PATH $CONDA_DIR/bin:$PATH
     5  
     6  RUN apt-get update && \
     7      apt-get install -y --no-install-recommends \
     8      ca-certificates \
     9      cmake \
    10      build-essential \
    11      gcc \
    12      g++ \
    13      git \
    14      curl && \
    15      # python environment
    16      curl -sL https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o conda.sh && \
    17      /bin/bash conda.sh -f -b -p $CONDA_DIR && \
    18      export PATH="$CONDA_DIR/bin:$PATH" && \
    19      conda config --set always_yes yes --set changeps1 no && \
    20      # lightgbm
    21      conda install -q -y numpy==1.20.3 scipy==1.6.2 scikit-learn==0.24.2 pandas==1.3.0 && \
    22      git clone --recursive --branch stable --depth 1 https://github.com/Microsoft/LightGBM && \
    23      mkdir LightGBM/build && \
    24      cd LightGBM/build && \
    25      cmake .. && \
    26      make -j4 && \
    27      make install && \
    28      cd ../python-package && \
    29      python setup.py install_lib && \
    30      # clean
    31      apt-get autoremove -y && apt-get clean && \
    32      conda clean -a -y && \
    33      rm -rf /usr/local/src/* && \
    34      rm -rf /LightGBM
    35  
    36  WORKDIR /app
    37  
    38  # Download the example data
    39  RUN mkdir data
    40  ADD https://raw.githubusercontent.com/microsoft/LightGBM/stable/examples/parallel_learning/binary.train data/.
    41  ADD https://raw.githubusercontent.com/microsoft/LightGBM/stable/examples/parallel_learning/binary.test data/.
    42  COPY *.py ./
    43  
    44  ENTRYPOINT [ "python", "/app/main.py" ]