diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index cf08fd3..2fc25b1 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -45,6 +45,7 @@ jobs: container_id: - xgb-ci.clang_tidy - xgb-ci.cpu + - xgb-ci.cpu_build_r_doc - xgb-ci.gpu - xgb-ci.gpu_build_r_rockylinux8 - xgb-ci.gpu_build_rockylinux8 diff --git a/containers/ci_container.yml b/containers/ci_container.yml index 63aa875..0c36c69 100644 --- a/containers/ci_container.yml +++ b/containers/ci_container.yml @@ -27,6 +27,9 @@ xgb-ci.gpu_build_r_rockylinux8: CUDA_VERSION: "12.4.1" R_VERSION: "4.3.2" +xgb-ci.cpu_build_r_doc: + container_def: cpu_build_r_doc + xgb-ci.gpu: container_def: gpu build_args: diff --git a/containers/dockerfile/Dockerfile.cpu_build_r_doc b/containers/dockerfile/Dockerfile.cpu_build_r_doc new file mode 100644 index 0000000..7be63bd --- /dev/null +++ b/containers/dockerfile/Dockerfile.cpu_build_r_doc @@ -0,0 +1,46 @@ +FROM ubuntu:22.04 + +SHELL ["/bin/bash", "-c"] + +ENV DEBIAN_FRONTEND=noninteractive + +# Install all basic requirements +RUN \ + apt-get update && \ + apt install --no-install-recommends software-properties-common dirmngr wget -y && \ + wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc && \ + add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/" && \ + apt-get update && \ + apt-get install -y --no-install-recommends r-base + +RUN \ + apt-get install \ + make cmake g++ gcc \ + libssl-dev libfreetype6-dev libpng-dev libtiff5-dev \ + libjpeg-dev libxml2-dev libcurl4-openssl-dev libharfbuzz-dev \ + libfribidi-dev libfontconfig1-dev libfontconfig1-dev libv8-dev \ + pandoc gfortran libblas-dev liblapack-dev librsvg2-dev -y + +ENV GOSU_VERSION=1.10 + +# Install lightweight sudo (not bound to TTY) +RUN set -ex; \ + wget -nv -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64" && \ + chmod +x /usr/local/bin/gosu && \ + gosu nobody true + +# Default entry-point to use if running locally +# It will preserve attributes of created files +COPY entrypoint.sh /scripts/ + +WORKDIR /workspace + +RUN mkdir /tmp/rtmpdir + +ENV R_LIBS_USER=/tmp/rtmpdir +ENV DOWNLOAD_STATIC_LIBV8=0 + +RUN \ + MAKEFLAGS=-j$(nproc) Rscript -e "install.packages(c('pkgdown', 'knitr'), repos = 'https://mirror.las.iastate.edu/CRAN/', Ncpus = parallel::detectCores())" + +ENTRYPOINT ["/scripts/entrypoint.sh"]