Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: [docker] [ci] fix dockerfiles, test docker builds in CI #6638

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
allow passing a git sha
  • Loading branch information
jameslamb committed Sep 3, 2024
commit 231a6635d5ff537e3aee2c91e6258dbc8e97b6a4
3 changes: 1 addition & 2 deletions docker/dockerfile-cli
Original file line number Diff line number Diff line change
@@ -23,9 +23,8 @@ RUN curl -L -o cmake.sh https://github.com/Kitware/CMake/releases/download/v3.29

RUN git clone \
--recursive \
--branch ${LIGHTGBM_GIT_REF} \
--depth 1 \
https://github.com/Microsoft/LightGBM && \
git -C ./LightGBM checkout ${LIGHTGBM_GIT_REF} && \
cd ./LightGBM && \
cmake -B build -S . && \
cmake --build build -j4 && \
5 changes: 4 additions & 1 deletion docker/dockerfile-python
Original file line number Diff line number Diff line change
@@ -23,7 +23,10 @@ RUN apt-get update && \
conda config --set always_yes yes --set changeps1 no && \
# lightgbm
conda install -q -y numpy scipy scikit-learn pandas && \
git clone --recursive --branch ${LIGHTGBM_GIT_REF} --depth 1 https://github.com/Microsoft/LightGBM && \
git clone \
--recursive \
https://github.com/Microsoft/LightGBM && \
git -C ./LightGBM checkout ${LIGHTGBM_GIT_REF} && \
cd ./LightGBM && \
sh ./build-python.sh install && \
# clean
4 changes: 2 additions & 2 deletions docker/dockerfile-r
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ RUN apt-get update && \
libomp-dev && \
git clone \
--recursive \
--branch ${LIGHTGBM_GIT_REF} \
--depth 1 https://github.com/Microsoft/LightGBM && \
https://github.com/Microsoft/LightGBM && \
git -C ./LightGBM checkout ${LIGHTGBM_GIT_REF} && \
cd ./LightGBM && \
sh build-cran-package.sh --no-build-vignettes && \
MAKEFLAGS="-j2" R CMD INSTALL ./lightgbm_*.tar.gz && \
5 changes: 4 additions & 1 deletion docker/gpu/dockerfile-cli-only-distroless.gpu
Original file line number Diff line number Diff line change
@@ -40,7 +40,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \

# LightGBM
WORKDIR /opt
RUN git clone --recursive --branch ${LIGHTGBM_GIT_REF} --depth 1 https://github.com/Microsoft/LightGBM && \
RUN git clone \
--recursive \
https://github.com/Microsoft/LightGBM && \
git -C ./LightGBM checkout ${LIGHTGBM_GIT_REF} && \
cd LightGBM && \
cmake -B build -S . -DUSE_GPU=1 -DOpenCL_LIBRARY=${OPENCL_LIBRARIES}/libOpenCL.so.1 -DOpenCL_INCLUDE_DIR=$OPENCL_INCLUDE_DIR && \
OPENCL_HEADERS=$OPENCL_INCLUDE_DIR LIBOPENCL=$OPENCL_LIBRARIES cmake --build build
5 changes: 4 additions & 1 deletion docker/gpu/dockerfile-cli-only.gpu
Original file line number Diff line number Diff line change
@@ -40,7 +40,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \

# LightGBM
WORKDIR /opt
RUN git clone --recursive --branch ${LIGHTGBM_GIT_REF} --depth 1 https://github.com/Microsoft/LightGBM && \
RUN git clone \
--recursive \
https://github.com/Microsoft/LightGBM && \
git -C ./LightGBM checkout ${LIGHTGBM_GIT_REF} && \
cd LightGBM && \
cmake -B build -S . -DUSE_GPU=1 -DOpenCL_LIBRARY=${OPENCL_LIBRARIES}/libOpenCL.so.1 -DOpenCL_INCLUDE_DIR=$OPENCL_INCLUDE_DIR && \
OPENCL_HEADERS=$OPENCL_INCLUDE_DIR LIBOPENCL=$OPENCL_LIBRARIES cmake --build build
5 changes: 4 additions & 1 deletion docker/gpu/dockerfile.gpu
Original file line number Diff line number Diff line change
@@ -82,7 +82,10 @@ RUN conda config --set always_yes yes --set changeps1 no && \
#################################################################################################################

RUN cd /usr/local/src && mkdir lightgbm && cd lightgbm && \
git clone --recursive --branch ${LIGHTGBM_GIT_REF} --depth 1 https://github.com/microsoft/LightGBM && \
git clone \
--recursive \
https://github.com/Microsoft/LightGBM && \
git -C ./LightGBM checkout ${LIGHTGBM_GIT_REF} && \
cd LightGBM && \
cmake -B build -S . -DUSE_GPU=1 -DOpenCL_LIBRARY=/usr/local/cuda/lib64/libOpenCL.so -DOpenCL_INCLUDE_DIR=/usr/local/cuda/include/ && \
OPENCL_HEADERS=/usr/local/cuda-8.0/targets/x86_64-linux/include LIBOPENCL=/usr/local/cuda-8.0/targets/x86_64-linux/lib cmake --build build
Loading
Oops, something went wrong.