英文:
Oracle Java and XGBoost4j on Alpine
问题
我正试图在Alpine Linux上使用XGBoost4j(https://github.com/dmlc/xgboost/tree/master/jvm-packages),并配合使用Oracle Java。
我知道任何使用glibc的东西可能不适用于Alpine,但在这种情况下,使用OpenJDK是不可行的,因为OpenJDK与我其他一些代码不兼容。
所以,我尝试使用与Alpine Linux映像中相同的Oracle Java版本自己编译XGBoost4j。我还将glibc(2.25-r0)添加到此映像中,以使Oracle Java正常工作。一切正常运行,但是一旦我尝试在此映像中使用XGBoost训练模型,就会出现以下错误:
ld.so检测到不一致性:dl-lookup.c:128:check_match:断言“version->filename == NULL || !_dl_name_match_p(version->filename,map)”失败!
我四处搜寻了一下,有人说添加libc6-compat可能会起作用。但这与glibc不兼容。所以我很困惑。是否还有其他有用的Alpine库,或者这根本行不通?
英文:
I am trying to use XGBoost4j (https://github.com/dmlc/xgboost/tree/master/jvm-packages) on Alpine Linux, with Oracle Java.
I know anything using glibc should probably not be used on Alpine, but using OpenJDK is not an option in this case as OpenJDK does not play nice with some of my other code.
So, what I have tried is compiling XGBoost4j myself with the same Oracle Java version I have in the Alpine Linux image. I have also added glibc (2.25-r0) to this image as well to get Oracle Java to work. Everything works nicely, but once I try to train a model with XGBoost in this image I get this error:
Inconsistency detected by ld.so: dl-lookup.c: 128: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!
I searched around for a bit and people said adding libc6-compat might work. But that is incompatible with glibc. So I'm at a loss here. Are there any other Alpine libraries I'm missing that can be helpful, or is this just not doable?
专注分享java语言的经验与见解,让所有开发者获益!
评论