xgboost0.7的编译安装
来源:互联网 发布:js replace 单引号 编辑:程序博客网 时间:2024/06/06 02:45
背景
编译jvm-package
It consists of two steps:
- First build the shared library from the C++ codes (
libxgboost.so
for linux/osx andlibxgboost.dll
for windows).- Exception: for R-package installation please directly refer to the R package section.
- Then install the language packages (e.g. Python Package)
构建共享代码库
Building on Ubuntu/Debian
On Ubuntu, one builds xgboost by
Building on OSX¶
On OSX, one builds xgboost by
编译jvm-package
Installation
Currently, XGBoost4J only support installation from source. Building XGBoost4J using Maven requires Maven 3 or newer and Java 7+.
Before you install XGBoost4J, you need to define environment variable JAVA_HOME
as your JDK directory to ensure that your compiler can find jni.h
correctly, since XGBoost4J relies on JNI to implement the interaction between the JVM and native libraries.
After your JAVA_HOME
is defined correctly, it is as simple as run mvn package
under jvm-packages directory to install XGBoost4J. You can also skip the tests by running mvn -DskipTests=true package
, if you are sure about the correctness of your local setup.
To publish the artifacts to your local maven repository, run
Or, if you would like to skip tests, run
This command will publish the xgboost binaries, the compiled java classes as well as the java sources to your local repository. Then you can use XGBoost4J in your Java projects by including the following dependency inpom.xml
:
After integrating with Dataframe/Dataset APIs of Spark 2.0, XGBoost4J-Spark only supports compile with Spark 2.x. You can build XGBoost4J-Spark as a component of XGBoost4J by running mvn package
, and you can specify the version of spark with mvn -Dspark.version=2.0.0 package
. (To continue working with Spark 1.x, the users are supposed to update pom.xml by modifying the properties like spark.version
, scala.version
, andscala.binary.version
. Users also need to change the implementation by replacing SparkSession with SQLContext and the type of API parameters from Dataset[_] to Dataframe
spark.version
, scala.version
, andscala.binary.version。再执行mvn install。
使用
/lib64/libc.so.6: version `GLIBC_2.14' not found
google后得到原因是系统的glibc版本太低,软件编译时使用了较高版本的glibc引起的.wget http://people.centos.org/tru/devtools-2/devtools-2.repomv devtools-2.repo /etc/yum.repos.dyum install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++
mv /usr/bin/gcc /usr/bin/gcc-4.4.7mv /usr/bin/g++ /usr/bin/g++-4.4.7mv /usr/bin/c++ /usr/bin/c++-4.4.7ln -s /opt/rh/devtoolset-2/root/usr/bin/gcc /usr/bin/gccln -s /opt/rh/devtoolset-2/root/usr/bin/c++ /usr/bin/c++ln -s /opt/rh/devtoolset-2/root/usr/bin/g++ /usr/bin/g++gcc --version
- xgboost0.7的编译安装
- centos6 安装 xgboost0.6
- centos6安装xgboost0.6
- windows10+anaconda2+xgboost0.6的安装,VS和MinGW两种方式
- 将xgboost0.4升级到xgboost0.6版本
- 编译安装golang1.7及golang程序的交叉编译
- glibc的安装编译
- 编译安装的beanstalkd 。。
- mplayer的编译安装
- mysql的编译安装
- glibc的安装编译
- Nginx的编译安装
- cmake的安装编译
- nginx的编译安装
- SparkR的编译安装
- tesseract的编译安装
- Spark的安装,编译
- memcached 的编译安装
- 学生信息管理系统
- Error: "ssdk_instapager_login_html" is not translated in "en" (English) [MissingTranslation]
- 把2个有序数组合并成1个有序数组
- C++ 多重继承
- Session详解
- xgboost0.7的编译安装
- jQuery实现滚动效果
- NO.95 Jenkins管理员工具之:干掉无用的本地workspace(Java版)
- 分页复用代码【Page类、JSP显示页面】
- maven报错
- Mysql command list
- book
- excle导出
- Java操作Excel文件导入