[CI] Update R version on Linux. (#9835)

This commit is contained in:
Jiaming Yuan 2023-12-02 11:03:17 +08:00 committed by GitHub
parent 2d8c67d6dc
commit e78b46046e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 10 deletions

View File

@ -7,7 +7,9 @@ source tests/buildkite/conftest.sh
echo "--- Build XGBoost R package with CUDA" echo "--- Build XGBoost R package with CUDA"
tests/ci_build/ci_build.sh gpu_build_r_centos7 docker \ tests/ci_build/ci_build.sh gpu_build_r_centos7 docker \
--build-arg CUDA_VERSION_ARG=${CUDA_VERSION} tests/ci_build/build_r_pkg_with_cuda.sh \ --build-arg CUDA_VERSION_ARG=${CUDA_VERSION} \
--build-arg R_VERSION_ARG=${R_VERSION} \
tests/ci_build/build_r_pkg_with_cuda.sh \
${BUILDKITE_COMMIT} ${BUILDKITE_COMMIT}
if [[ ($is_pull_request == 0) && ($is_release_branch == 1) ]] if [[ ($is_pull_request == 0) && ($is_release_branch == 1) ]]

View File

@ -27,6 +27,7 @@ NCCL_VERSION=2.16.5-1
RAPIDS_VERSION=23.10 RAPIDS_VERSION=23.10
SPARK_VERSION=3.4.0 SPARK_VERSION=3.4.0
JDK_VERSION=8 JDK_VERSION=8
R_VERSION=4.3.2
if [[ -z ${BUILDKITE:-} ]] if [[ -z ${BUILDKITE:-} ]]
then then

View File

@ -1,6 +1,7 @@
ARG CUDA_VERSION_ARG ARG CUDA_VERSION_ARG
FROM nvcr.io/nvidia/cuda:$CUDA_VERSION_ARG-devel-centos7 FROM nvcr.io/nvidia/cuda:$CUDA_VERSION_ARG-devel-centos7
ARG CUDA_VERSION_ARG ARG CUDA_VERSION_ARG
ARG R_VERSION_ARG
# Install all basic requirements # Install all basic requirements
RUN \ RUN \
@ -11,26 +12,28 @@ RUN \
yum -y update && \ yum -y update && \
yum install -y tar unzip wget xz git which ninja-build readline-devel libX11-devel libXt-devel \ yum install -y tar unzip wget xz git which ninja-build readline-devel libX11-devel libXt-devel \
xorg-x11-server-devel openssl-devel zlib-devel bzip2-devel xz-devel \ xorg-x11-server-devel openssl-devel zlib-devel bzip2-devel xz-devel \
pcre-devel libcurl-devel texlive-* \ pcre2-devel libcurl-devel texlive-* \
devtoolset-9-gcc devtoolset-9-binutils devtoolset-9-gcc-c++ \ devtoolset-9-gcc devtoolset-9-binutils devtoolset-9-gcc-c++ \
devtoolset-9-gcc-gfortran devtoolset-9-libquadmath-devel \ devtoolset-9-gcc-gfortran devtoolset-9-libquadmath-devel \
devtoolset-9-runtime devtoolset-9-libstdc++-devel devtoolset-9-runtime devtoolset-9-libstdc++-devel
ENV PATH=/opt/mambaforge/bin:/usr/local/ninja:/opt/software/packages/bin:/opt/R/3.3.0/bin:$PATH ENV PATH=/opt/mambaforge/bin:/usr/local/ninja:/opt/software/packages/bin:/opt/R/$R_VERSION_ARG/bin:$PATH
ENV LD_LIBRARY_PATH=/opt/software/packages/lib:/opt/R/3.3.0/lib64:$LD_LIBRARY_PATH ENV LD_LIBRARY_PATH=/opt/software/packages/lib:/opt/R/$R_VERSION_ARG/lib64:$LD_LIBRARY_PATH
ENV CC=/opt/rh/devtoolset-9/root/usr/bin/gcc ENV CC=/opt/rh/devtoolset-9/root/usr/bin/gcc
ENV CXX=/opt/rh/devtoolset-9/root/usr/bin/c++ ENV CXX=/opt/rh/devtoolset-9/root/usr/bin/c++
ENV CPP=/opt/rh/devtoolset-9/root/usr/bin/cpp ENV CPP=/opt/rh/devtoolset-9/root/usr/bin/cpp
ENV F77=/opt/rh/devtoolset-9/root/usr/bin/gfortran ENV F77=/opt/rh/devtoolset-9/root/usr/bin/gfortran
ENV FC=/opt/rh/devtoolset-9/root/usr/bin/gfortran
# R 3.3.0
RUN \ RUN \
wget -nv -nc https://cran.r-project.org/src/base/R-3/R-3.3.0.tar.gz && \ wget -nv -nc https://cran.r-project.org/src/base/R-4/R-$R_VERSION_ARG.tar.gz && \
tar xf R-3.3.0.tar.gz && \ tar xf R-$R_VERSION_ARG.tar.gz && \
cd R-3.3.0 && \ cd R-$R_VERSION_ARG && \
./configure --prefix=/opt/R/3.3.0 --enable-R-shlib && \ ./configure --prefix=/opt/R/$R_VERSION_ARG --enable-R-shlib --with-pcrel && \
make -j$(nproc) && \ make -j$(nproc) && \
make install && \ make install
run \
# Python # Python
wget -nv -O conda.sh https://github.com/conda-forge/miniforge/releases/download/22.11.1-2/Mambaforge-22.11.1-2-Linux-x86_64.sh && \ wget -nv -O conda.sh https://github.com/conda-forge/miniforge/releases/download/22.11.1-2/Mambaforge-22.11.1-2-Linux-x86_64.sh && \
bash conda.sh -b -p /opt/mambaforge && \ bash conda.sh -b -p /opt/mambaforge && \