From 994fc1bf7dc91fb3d67207b1f23efa70a5832816 Mon Sep 17 00:00:00 2001 From: John Quitto-Graham Date: Wed, 21 Oct 2020 18:54:59 -0700 Subject: [PATCH] Adding commit hash as an ARG and simple catboost build --- Dockerfile | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3db40af..2002199 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ ARG CUDA_VERSION +ARG XGB_HASH=6d293020fbfa2c67b532d550fe5d55689662caac FROM nvidia/cuda:$CUDA_VERSION-devel-ubuntu16.04 SHELL ["/bin/bash", "-c"] # Install conda (and use python 3.7) @@ -26,6 +27,7 @@ RUN curl -o /opt/miniconda.sh \ /opt/conda/bin/conda update -n base conda && \ rm /opt/miniconda.sh ENV PATH /opt/conda/bin:$PATH + RUN conda install -c conda-forge \ bokeh \ h5py \ @@ -107,26 +109,14 @@ RUN git config --global http.sslVerify false && \ python setup.py install --precompile # catboost -RUN if ["$CUDA_VERSION" < "11.0"]; then git config --global http.sslVerify false && \ - git clone --recursive "https://github.com/catboost/catboost" /opt/catboost && \ - cd /opt/catboost && \ - cd catboost/python-package/catboost && \ - ../../../ya make \ - -r \ - -o ../../.. \ - -DUSE_ARCADIA_PYTHON=no \ - -DUSE_SYSTEM_PYTHON=3.7\ - -DPYTHON_CONFIG=python3-config \ - -DCUDA_ROOT=$(dirname $(dirname $(which nvcc))); \ - fi -ENV if ["$CUDA_VERSION" < "11.0"]; then PYTHONPATH=$PYTHONPATH:/opt/catboost/catboost/python-package; fi\ - - +RUN pip install catboost # xgboost RUN git config --global http.sslVerify false && \ git clone --recursive https://github.com/dmlc/xgboost /opt/xgboost && \ cd /opt/xgboost && \ + git checkout $XGB_HASH && \ + git submodule update --init --recursive && \ mkdir build && \ cd build && \ RMM_ROOT=/opt/conda cmake .. \ @@ -134,6 +124,7 @@ RUN git config --global http.sslVerify false && \ -DUSE_NCCL=ON \ -DPLUGIN_RMM=ON && \ make -j4 && \ + git log > xgb_log.txt && \ cd ../python-package && \ pip uninstall -y xgboost && \ python setup.py install