diff --git a/.travis.yml b/.travis.yml index ecd562df3..f4ffa24d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -52,6 +52,7 @@ addons: apt: packages: - snapd + - unzip before_install: - source tests/travis/travis_setup_env.sh diff --git a/Jenkinsfile b/Jenkinsfile index 964bc1022..c77a38ede 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -190,11 +190,20 @@ def BuildCUDA(args) { if (env.BRANCH_NAME != 'master' && !(env.BRANCH_NAME.startsWith('release'))) { arch_flag = "-DGPU_COMPUTE_VER=75" } + def wheel_tag = "manylinux2010_x86_64" sh """ ${dockerRun} ${container_type} ${docker_binary} ${docker_args} tests/ci_build/build_via_cmake.sh -DUSE_CUDA=ON -DUSE_NCCL=ON -DOPEN_MP:BOOL=ON -DHIDE_CXX_SYMBOLS=ON ${arch_flag} ${dockerRun} ${container_type} ${docker_binary} ${docker_args} bash -c "cd python-package && rm -rf dist/* && python setup.py bdist_wheel --universal" - ${dockerRun} ${container_type} ${docker_binary} ${docker_args} python tests/ci_build/rename_whl.py python-package/dist/*.whl ${commit_id} manylinux2010_x86_64 + ${dockerRun} ${container_type} ${docker_binary} ${docker_args} python tests/ci_build/rename_whl.py python-package/dist/*.whl ${commit_id} ${wheel_tag} """ + if (args.cuda_version == ref_cuda_ver) { + sh """ + ${dockerRun} ${container_type} ${docker_binary} ${docker_args} auditwheel repair --plat ${wheel_tag} python-package/dist/*.whl + mv -v wheelhouse/*.whl python-package/dist/ + # Make sure that libgomp.so is vendored in the wheel + ${dockerRun} ${container_type} ${docker_binary} ${docker_args} bash -c "unzip -l python-package/dist/*.whl | grep libgomp || exit -1" + """ + } echo 'Stashing Python wheel...' stash name: "xgboost_whl_cuda${args.cuda_version}", includes: 'python-package/dist/*.whl' if (args.cuda_version == ref_cuda_ver && (env.BRANCH_NAME == 'master' || env.BRANCH_NAME.startsWith('release'))) { diff --git a/tests/ci_build/CentOS-Base.repo b/tests/ci_build/CentOS-Base.repo new file mode 100644 index 000000000..41fb3c1fc --- /dev/null +++ b/tests/ci_build/CentOS-Base.repo @@ -0,0 +1,37 @@ +[base] +name=CentOS-$releasever - Base +baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 + +#released updates +[updates] +name=CentOS-$releasever - Updates +baseurl=http://vault.centos.org/centos/$releasever/updates/$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 + +#additional packages that may be useful +[extras] +name=CentOS-$releasever - Extras +baseurl=http://vault.centos.org/centos/$releasever/extras/$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 + +#additional packages that extend functionality of existing packages +[centosplus] +name=CentOS-$releasever - Plus +mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra +#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ +gpgcheck=1 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 + +#contrib - packages by Centos Users +[contrib] +name=CentOS-$releasever - Contrib +mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib&infra=$infra +#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/ +gpgcheck=1 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 diff --git a/tests/ci_build/Dockerfile.gpu_build_centos6 b/tests/ci_build/Dockerfile.gpu_build_centos6 index 201ce00df..0f23cddf9 100644 --- a/tests/ci_build/Dockerfile.gpu_build_centos6 +++ b/tests/ci_build/Dockerfile.gpu_build_centos6 @@ -6,12 +6,13 @@ ARG CUDA_VERSION_ARG ENV DEBIAN_FRONTEND noninteractive ENV DEVTOOLSET_URL_ROOT http://vault.centos.org/6.9/sclo/x86_64/rh/devtoolset-4/ +COPY CentOS-Base.repo /etc/yum.repos.d/ + # Install all basic requirements RUN \ + yum install -y epel-release && \ yum -y update && \ - yum install -y tar unzip wget xz git centos-release-scl yum-utils && \ - yum-config-manager --enable centos-sclo-rh-testing && \ - yum -y update && \ + yum install -y tar unzip wget xz git patchelf && \ yum install -y $DEVTOOLSET_URL_ROOT/devtoolset-4-gcc-5.3.1-6.1.el6.x86_64.rpm \ $DEVTOOLSET_URL_ROOT/devtoolset-4-gcc-c++-5.3.1-6.1.el6.x86_64.rpm \ $DEVTOOLSET_URL_ROOT/devtoolset-4-binutils-2.25.1-8.el6.x86_64.rpm \ @@ -20,6 +21,7 @@ RUN \ # Python wget -O Miniconda3.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ bash Miniconda3.sh -b -p /opt/python && \ + /opt/python/bin/python -m pip install auditwheel && \ # CMake wget -nv -nc https://cmake.org/files/v3.13/cmake-3.13.0-Linux-x86_64.sh --no-check-certificate && \ bash cmake-3.13.0-Linux-x86_64.sh --skip-license --prefix=/usr && \ @@ -29,7 +31,7 @@ RUN \ wget -nv -nc https://github.com/ninja-build/ninja/archive/v1.10.0.tar.gz --no-check-certificate && \ tar xf v1.10.0.tar.gz && mv ninja-1.10.0 ninja && rm -v v1.10.0.tar.gz && \ cd ninja && \ - python ./configure.py --bootstrap + /opt/python/bin/python ./configure.py --bootstrap # NCCL2 (License: https://docs.nvidia.com/deeplearning/sdk/nccl-sla/index.html) RUN \ diff --git a/tests/ci_build/conda_env/aarch64_test.yml b/tests/ci_build/conda_env/aarch64_test.yml index 7c89ba58a..cbf9ae92d 100644 --- a/tests/ci_build/conda_env/aarch64_test.yml +++ b/tests/ci_build/conda_env/aarch64_test.yml @@ -27,3 +27,4 @@ dependencies: - pip: - shap - awscli + - auditwheel diff --git a/tests/travis/run_test.sh b/tests/travis/run_test.sh index 9db0abb99..ee38061a1 100755 --- a/tests/travis/run_test.sh +++ b/tests/travis/run_test.sh @@ -34,6 +34,10 @@ if [ ${TASK} == "python_test" ]; then tests/ci_build/ci_build.sh aarch64 docker bash -c "cd python-package && rm -rf dist/* && python setup.py bdist_wheel --universal" TAG=manylinux2014_aarch64 tests/ci_build/ci_build.sh aarch64 docker python tests/ci_build/rename_whl.py python-package/dist/*.whl ${TRAVIS_COMMIT} ${TAG} + tests/ci_build/ci_build.sh aarch64 docker auditwheel repair --plat ${TAG} python-package/dist/*.whl + mv -v wheelhouse/*.whl python-package/dist/ + # Make sure that libgomp.so is vendored in the wheel + unzip -l python-package/dist/*.whl | grep libgomp || exit -1 else rm -rf build mkdir build && cd build