Skip to content

Commit

Permalink
Build R API document. (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis authored Jan 17, 2025
1 parent 8508a80 commit 13f578b
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions containers/ci_container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
46 changes: 46 additions & 0 deletions containers/dockerfile/Dockerfile.cpu_build_r_doc
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit 13f578b

Please sign in to comment.