2022-12-29 07:43:50 +03:00
|
|
|
FROM ubuntu:20.04
|
2017-02-02 10:37:57 +03:00
|
|
|
|
2022-02-12 04:08:37 +03:00
|
|
|
ARG CONDA_DIR=/opt/miniforge
|
2022-12-29 07:43:50 +03:00
|
|
|
|
|
|
|
ENV \
|
|
|
|
DEBIAN_FRONTEND=noninteractive \
|
|
|
|
LANG=C.UTF-8 \
|
|
|
|
LC_ALL=C.UTF-8 \
|
|
|
|
PATH=$CONDA_DIR/bin:$PATH
|
2019-10-07 15:13:56 +03:00
|
|
|
|
2017-02-02 10:37:57 +03:00
|
|
|
RUN apt-get update && \
|
2019-08-13 15:32:39 +03:00
|
|
|
apt-get install -y --no-install-recommends \
|
2019-11-11 01:27:00 +03:00
|
|
|
ca-certificates \
|
2019-08-13 15:32:39 +03:00
|
|
|
cmake \
|
|
|
|
build-essential \
|
|
|
|
gcc \
|
|
|
|
g++ \
|
2021-03-28 16:36:06 +03:00
|
|
|
curl \
|
2022-12-29 07:43:50 +03:00
|
|
|
git \
|
|
|
|
libomp-dev && \
|
2019-11-12 08:50:24 +03:00
|
|
|
# python environment
|
2022-02-12 04:08:37 +03:00
|
|
|
curl -sL https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -o miniforge.sh && \
|
|
|
|
/bin/bash miniforge.sh -f -b -p $CONDA_DIR && \
|
2019-10-07 15:13:56 +03:00
|
|
|
export PATH="$CONDA_DIR/bin:$PATH" && \
|
2019-08-13 15:32:39 +03:00
|
|
|
conda config --set always_yes yes --set changeps1 no && \
|
2017-02-02 10:37:57 +03:00
|
|
|
# lightgbm
|
2020-04-10 06:53:21 +03:00
|
|
|
conda install -q -y numpy scipy scikit-learn pandas && \
|
2019-08-13 15:32:39 +03:00
|
|
|
git clone --recursive --branch stable --depth 1 https://github.com/Microsoft/LightGBM && \
|
2023-07-19 21:36:59 +03:00
|
|
|
cd ./LightGBM && \
|
2023-05-05 01:06:11 +03:00
|
|
|
sh ./build-python.sh install && \
|
2019-11-12 08:50:24 +03:00
|
|
|
# clean
|
2017-02-02 10:37:57 +03:00
|
|
|
apt-get autoremove -y && apt-get clean && \
|
2019-08-13 15:32:39 +03:00
|
|
|
conda clean -a -y && \
|
2017-02-02 10:37:57 +03:00
|
|
|
rm -rf /usr/local/src/*
|