Skip to content

Commit

Permalink
Adding commit hash as an ARG and simple catboost build
Browse files Browse the repository at this point in the history
  • Loading branch information
nvidia-johnq committed Oct 22, 2020
1 parent d545c1e commit fd23142
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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 \
Expand Down Expand Up @@ -107,33 +109,22 @@ 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 .. \
-DUSE_CUDA=ON \
-DUSE_NCCL=ON \
-DPLUGIN_RMM=ON && \
make -j4 && \
git log > xgb_log.txt && \
cd ../python-package && \
pip uninstall -y xgboost && \
python setup.py install

0 comments on commit fd23142

Please sign in to comment.