xgboost: `Segmentation Fault / Killed` when run on Python inside Docker Container (Alpine)
Within a docker container (based on alpine linux) with Python 2.7 installed, I receive a Segmentation Fault error that kills the entire process and then the container exits.
This DOES NOT happen during fitting but only happens when I use the loaded model to predict. My current script uses XGBoost alongside SKLearn’s GridSearchCV. The gsv.fit method runs perfectly fine and then I save the gsv.best_estimator_ as a pickle to be later used. When I load the model from pickle and calls method predict, the container hangs for a while and exits with Segmentation Fault error message. (or sometimes the python script is Killed by the container.)
Build Specifications Currently using Xgboost with Sklearn’s GridSearchCV inside a Docker Container based on Alpine linux. The build specifications closely resembles this base image https://github.com/Nexosis/alpine-xgboost/blob/master/Dockerfile
When I run pip list here is the result for xgboost
xgboost 0.80
Here is a full list of other python libraries just in case
Package Version
----------------------------- -------
arrow 0.12.1
backports.functools-lru-cache 1.5
numpy 1.14.5
pandas 0.23.4
pip 18.0
PyMySQL 0.8.0
python-dateutil 2.7.3
pytz 2018.5
scikit-learn 0.19.2
scipy 1.1.0
setuptools 39.0.1
six 1.11.0
SQLAlchemy 1.2.11
thrift 0.11.0
wheel 0.31.0
xgboost 0.80
Steps to Reproduce
- Create Training Model with GridSearchCV
- Save Training Model into a pickle file …
- Load model from pickle file
- Use
model.predict(dataframe)
What happens next
Either the container Kills this python process OR I get an error that says Segmentation fault and the container dies.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 25 (1 by maintainers)
@eblancost The pull request dmlc/dmlc-core#487 should fix compilation for systems using MUSL. Thanks for your report.