Issue with install xgboost on alpine container


#1

2 months ago i built an alpine image that installed successfully the xgboost through the following commands:

RUN mkdir /src &&
cd /src &&
git clone --recursive https://github.com/dmlc/xgboost &&
sed -i ‘/#define DMLC_LOG_STACK_TRACE 1/d’ /src/xgboost/dmlc-core/include/dmlc/base.h &&
sed -i ‘/#define DMLC_LOG_STACK_TRACE 1/d’ /src/xgboost/rabit/include/dmlc/base.h &&
cd /src/xgboost; make -j4 &&
cd /src/xgboost/python-package &&
python3 setup.py install

but i changed primary layers and now its required to install the xgboost again but it throws the following:

someone help ??

Thanks.


#2

Can you use CMake to compile?


#3

I tried to run the following with cmake as you suggested:

RUN git clone --recursive https://github.com/dmlc/xgboost &&
sed -i ‘/#define DMLC_LOG_STACK_TRACE 1/d’ /xgboost/dmlc-core/include/dmlc/base.h &&
sed -i ‘/#define DMLC_LOG_STACK_TRACE 1/d’ /xgboost/rabit/include/dmlc/base.h
RUN apk add cmake
RUN cd /xgboost; cmake .
RUN cd /xgboost/python-package &&
python3 setup.py install

but i got this:


#4

Run the following commands:

mkdir build
cd build
cmake ..
make

#5

I tried this:

RUN git clone --recursive https://github.com/dmlc/xgboost &&
sed -i ‘/#define DMLC_LOG_STACK_TRACE 1/d’ /xgboost/dmlc-core/include/dmlc/base.h &&
sed -i ‘/#define DMLC_LOG_STACK_TRACE 1/d’ /xgboost/rabit/include/dmlc/base.h

RUN apk add cmake
RUN cd /xgboost &&
mkdir build &&
cd build &&
cmake … &&
make

but i got:

Thanks!


#6

Fixed by building alipne docker image with conda