Comments (6)
XGBoost4j needs to be compiled from source on Linux distributions which use musl libc. Or you can install glibc (though on that specific version used in Tribuo 4.3.1 it tries to autodetect musl and that autodetection will confuse things).
There are issues in XGBoost's GitHub page with more details, e.g. dmlc/xgboost#7921.
We have a note about XGBoost's binary support in the javadocs - https://github.com/oracle/tribuo/blob/main/Common/XGBoost/src/main/java/org/tribuo/common/xgboost/XGBoostTrainer.java#L65
from tribuo.
I've tried to install additional C/C++ libraries, as it was mentioned in the note, you've mentioned, but no luck.
Docker Image: openjdk:17-jdk-alpine3.14
Additional libraries:
- RUN apk --no-cache add ca-certificates wget
- RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
- RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.30-r0/glibc-2.30-r0.apk
- RUN apk add glibc-2.30-r0.apk
- RUN apk add --no-cache libgomp libstdc++6 libgcc libstdc++ ncurses-libs
Still facing exception:
Caused by: java.io.FileNotFoundException: File /lib/linux-musl/x86_64/libxgboost4j.so was not found inside JAR. at ml.dmlc.xgboost4j.java.NativeLibLoader.createTempFileFromResource(NativeLibLoader.java:298) at ml.dmlc.xgboost4j.java.NativeLibLoader.loadLibraryFromJar(NativeLibLoader.java:241) at ml.dmlc.xgboost4j.java.NativeLibLoader.initXGBoost(NativeLibLoader.java:176) at ml.dmlc.xgboost4j.java.XGBoostJNI.<clinit>(XGBoostJNI.java:34) ... 120 more
Any recommendations?
Can you recommend any other openjdk docker image where XGBoost can run smoothly?
from tribuo.
If you use an image based on RHEL/CentOS/OL or Ubuntu it should use glibc and it'll be fine. In the next version we'll pull in the updated XGBoost with the override, but at the moment it's autodetecting musl and you need to compile XGBoost for musl to make it work.
from tribuo.
Just tried to switch to Ubuntu, I've used the mcr.microsoft.com/openjdk/jdk:17-ubuntu
image, but got similar error.
Caused by: [CIRCULAR REFERENCE: java.lang.UnsatisfiedLinkError: /tmp/libxgboost4j8168818628742633668.so: libgomp.so.1: cannot open shared object file: No such file or directory]
from tribuo.
That's because you need OpenMP to get parallelization and the XGBoost binary the developers produce requires it. You can recompile XGBoost without it (and it'll be much slower), or install the libgomp1
package into your docker image.
from tribuo.
@Craigacp thank you!
The following workaround worked for me.
- Create your image
FROM mcr.microsoft.com/openjdk/jdk:17-ubuntu
RUN apt-get update && apt-get install -y libgomp1 && rm -rf /var/lib/apt/lists/*
from tribuo.
Related Issues (20)
- getClusters in HDBSCAN transformed model HOT 2
- Import CARTClassificationTrainer without using tribuo-all HOT 2
- Error on irises-tribuo-v4.ipynb HOT 1
- TransformedModel doesn't have a protobuf
- mRMR HOT 1
- FS using wrapper approaches HOT 7
- Docs recommending IJava HOT 2
- Problem deserializing the XGBoostModel HOT 1
- Do you have any plans to support time-series predictions? HOT 1
- Memory and SQLDataSource HOT 1
- About csvLoader.loadDataSource HOT 4
- Configuring HyperParameters HOT 4
- Question about input feature mapping HOT 9
- Llama APIs HOT 1
- Load data from List obj in memory HOT 1
- MLP HOT 1
- TensorFlow Isuue
- Training loss HOT 1
- Weight and Bias in NN HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tribuo.