chore: move docs/ and dockerfiles to own repo

This commit is contained in:
Patrick Schratz 2025-06-04 18:26:38 +02:00
commit e2d6240d36
Signed by: pat-s
GPG key ID: 3C6318841EF78925
6 changed files with 0 additions and 721 deletions

View file

@ -1,64 +0,0 @@
ARG OS_VERSION
FROM devxygmbh/alpine-jags:${OS_VERSION} AS jags
ARG OS_VERSION
FROM alpine:${OS_VERSION} AS final
ARG R_VERSION=4.4.3
ENV PATH=/opt/R/${R_VERSION}/bin:$PATH
ENV TZ="Europe/Berlin"
ENV R_LIBS_USER=/mnt/cache/R-pkgs
ENV R_PKG_CACHE_DIR=/mnt/cache/pkgcache
ENV NCPUS=2
ARG GITHUB_PAT
COPY --link --from=jags /JAGS-4.3.2 /JAGS-4.3.2
# Background: JAGS needs lapack & lapack-dev but these conflict with openblas-dev which is required by R-dev
# Solution: first compile JAGS, then remove lapack & lapack-dev again
# # xvfb: for graphical pkgs requiring tcl, like gWidgets2tcltk
RUN apk add -q --no-cache curl tar make blas blas-dev gcc gfortran g++ htop git cmake tk-dev xvfb xvfb-run xorg-server xauth xinit xz libdeflate libdeflate-dev
### CUSTOM DEPENDENCIES
# linux-headers: ps
# libxml2-dev: xml2
# libgit2-dev: gert
# libpq-dev: RPostgres
# libfftw3-dev: ravetools -> actually auto-detect but somehow doesn't work in container?
RUN apk add -q --no-cache R-dev curl ca-certificates bash g++ tzdata openjdk17 tar sed patch openblas-dev pkgconfig linux-headers ccache libxml2-dev libgit2-dev libpq-dev pkgconfig fftw-dev automake autoconf libtool elfutils-dev
# - Chromium should be auto-installed once pkgdepends merges the latest system-requirements rule changes
RUN apk add -q --no-cache chromium
# https://github.com/RcppCore/Rcpp/issues/448#issuecomment-220148774
# LDFLAGS+=-fPIC -> arrow (https://github.com/r-hub/r-minimal/blob/main/examples/arrow/Dockerfile)
# dbarts: CFLAGS += -flax-vector-conversions (https://github.com/vdorie/dbarts/issues/66)
# CXXFLAGS: -> Rcpp
# -DDMLC_USE_FOPEN64=0 -> xgboost (https://github.com/dmlc/xgboost/issues/8595)
# can't set ccache for gfortran because of https://gitlab.com/roigrp/solver/highs/-/issues/4
RUN mkdir -p /root/.R && bash -c 'echo -e "CXX_STD = CXX14\nCXXFLAGS=-D__MUSL__ -DDMLC_USE_FOPEN64=0\nCPPFLAGS=-D__MUSL__ -DDMLC_USE_FOPEN64=0\nCFLAGS += -flax-vector-conversions\nLDFLAGS+=-fPIC\nCC=ccache gcc\nCPP=gcc -E\nCXXCPP=gcc -e\nCXX=ccache g++\nCXX11=ccache g++\nCXX14=ccache g++\nCXX17=ccache g++\nF77=gfortran\nFC=gfortran" > /root/.R/Makevars'
# R repos
RUN bash -c 'echo -e "options(crayon.enabled = TRUE, Ncpus = ${NCPUS}, future.globals.onReference = NULL, repos = structure(c(CRAN = \"https://cloud.r-project.org\", INLA = \"https://inla.r-inla-download.org/R/stable\")))" > /root/.Rprofile'
RUN bash -c 'echo -e "PKG_SYSREQS=TRUE\nPKG_SYSREQS_VERBOSE=TRUE" > ~/.Renviron'
### INSTALL R
ARG OS_VERSION
RUN export OS_VERSION_TRIM=$(echo $OS_VERSION | tr -d '.') && \
curl -v -O "https://devxy-r-builds.fsn1.your-objectstorage.com/alpine${OS_VERSION_TRIM}/r-${R_VERSION}_1_$(arch).apk"
RUN apk add --allow-untrusted "r-${R_VERSION}_1_$(arch).apk" && rm "r-${R_VERSION}_1_$(arch).apk"
RUN R -q -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/devel/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))'
# these dirs will later be used by the CI with existing mounts
RUN mkdir -p /mnt/cache/packages /mnt/cache/pkgcache /mnt/cache/R-pkgs
# encoding -> https://github.com/r-hub/r-minimal/blob/fa9c117313e05860a0d20b113e5f794c51be8b8c/Dockerfile#L84
RUN sed -i 's/,//g' /opt/R/${R_VERSION}/lib/R/library/utils/iconvlist
RUN R -q -e 'pak::pak("git::https://codefloe.com/rpkgs/bincraftr.git", dependencies = TRUE)'
CMD ["/bin/bash"]

View file

@ -1,11 +0,0 @@
ARG VERSION
FROM alpine:${VERSION} AS jags
ARG JAGS_VERSION=4.3.2
RUN apk add -q --no-cache curl tar make lapack lapack-dev blas blas-dev gcc gfortran g++ git cmake tk-dev xz
# These usually are not packaged in OS repositories and need to be installed from source
# - JAGS (needed for runjags which itself is again a dependency of many packages)
RUN curl -s -L -O https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Source/JAGS-${JAGS_VERSION}.tar.gz && \
tar -xzf JAGS-${JAGS_VERSION}.tar.gz && cd JAGS-${JAGS_VERSION} && ./configure --enable-silent-rules && make 2>&1

View file

@ -1,68 +0,0 @@
ARG OS_VERSION
FROM devxygmbh/redhat-jags:${OS_VERSION} AS jags
ARG OS_VERSION
FROM redhat/ubi${OS_VERSION} AS final
ARG R_VERSION
ARG RED_HAT_DEV_PW
ENV PATH=/opt/R/${R_VERSION}/bin:$PATH
ENV TZ="Europe/Berlin"
ENV R_LIBS_USER=/mnt/cache/R-pkgs
ENV R_PKG_CACHE_DIR=/mnt/cache/pkgcache
ENV NCPUS=2
ARG GITHUB_PAT
COPY --link --from=jags /JAGS-4.3.2 /JAGS-4.3.2
ARG OS_VERSION
RUN subscription-manager register --username mail@devxy.io --password "$RED_HAT_DEV_PW" && subscription-manager repos --enable codeready-builder-for-rhel-${OS_VERSION}-$(arch)-rpms
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-${OS_VERSION}.noarch.rpm && dnf install -y epel-release
# xvfb: for graphical pkgs requiring tcl, like gWidgets2tcltk
# ImageMagick-c++-devel ImageMagick-devel: boths are not auto-installed via pak sysreqs
# mecab-devel: RcppMeCab -> no autodetection yet
# libfftw3-dev: ravetools -> actually auto-detect but somehow doesn't work in container?
ARG OS_VERSION
RUN if [ "$OS_VERSION" = "8" ]; then \
dnf install -y -q make lapack-devel git gcc gcc-c++ fontconfig-devel fribidi-devel libjpeg-turbo-devel libtiff-devel postgresql-devel htop libgit2_1.7-devel libxml2-devel hiredis ccache cmake xorg-x11-server-Xvfb ImageMagick-c++-devel ImageMagick-devel xz pkg-config mecab-devel fftw-devel tk-devel automake readline-devel; \
elif [ "$OS_VERSION" = "9" ] || [ "$OS_VERSION" = "10" ]; then \
dnf install -y -q make lapack-devel git gcc gcc-c++ fontconfig-devel fribidi-devel libjpeg-turbo-devel libtiff-devel postgresql-devel htop libgit2-devel libxml2-devel hiredis ccache cmake xorg-x11-server-Xvfb ImageMagick-c++-devel ImageMagick-devel xz pkg-config mecab-devel fftw-devel tk-devel automake readline-devel; \
fi;
### CUSTOM DEPENDENCIES
# - Chromium should be auto-installed once pkgdepends merges the latest system-requirements rule changes
RUN dnf install -y chromium
### INSTALL R
RUN curl -O "https://devxy-r-builds.fsn1.your-objectstorage.com/el${OS_VERSION}/R-${R_VERSION}-1-1.$(arch).rpm"
RUN dnf install -q -y "R-${R_VERSION}-1-1.$(arch).rpm" && rm "R-${R_VERSION}-1-1.$(arch).rpm"
RUN R -q -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/devel/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))'
RUN if [ "$OS_VERSION" = "8" ]; then \
export CXX_STD=14; \
elif [ "$OS_VERSION" = "9" ]; then \
export CXX_STD=17; \
elif [ "$OS_VERSION" = "10" ]; then \
export CXX_STD=20; \
fi; \
if [ "$(arch)" = "x86_64" ]; then \
export ARCH=amd64; \
elif [ "$(arch)" = "aarch64" ]; then \
export ARCH=arm64; \
fi; \
mkdir -p /root/.R && bash -c 'echo -e "CXX_STD = ${CXX_STD}\nCFLAGS += -flax-vector-conversions\nCC=ccache gcc\nCPP=gcc -E\nCXXCPP=gcc -e\nCXX=ccache g++\nCXX11=ccache g++\nCXX14=ccache g++\nCXX17=ccache g++\nF77=gfortran\nFC=gfortran" >> /root/.R/Makevars' && \
bash -c 'echo -e "options(crayon.enabled = TRUE, Ncpus = ${NCPUS}, future.globals.onReference = NULL, repos = structure(c(CRAN = \"https://cran.devxy.io/$ARCH/rhel${OS_VERSION}/latest\", INLA = \"https://inla.r-inla-download.org/R/stable\")))" > /root/.Rprofile' && \
bash -c 'echo -e "PKG_SYSREQS = TRUE\nPKG_SYSREQS_VERBOSE = TRUE\nPKG_SYSREQS_PLATFORM=\"redhat-${OS_VERSION}\"" > /root/.Renviron'
### Makevars
# dbarts: CFLAGS += -flax-vector-conversions (https://github.com/vdorie/dbarts/issues/66)
# can't set ccache for gfortran because of https://gitlab.com/roigrp/solver/highs/-/issues/4
# these dirs will later be used by the CI with existing mounts
RUN mkdir -p /mnt/cache/packages /mnt/cache/pkgcache /mnt/cache/R-pkgs
RUN R -q -e 'getOption("repos"); pak::pak("git::https://codefloe.com/rpkgs/bincraftr.git", dependencies = TRUE)'
CMD ["/bin/bash"]

View file

@ -1,13 +0,0 @@
ARG VERSION
FROM redhat/ubi${VERSION} AS jags
ARG RED_HAT_DEV_PW
ARG VERSION
RUN subscription-manager register --username mail@devxy.io --password "$RED_HAT_DEV_PW" && subscription-manager repos --enable codeready-builder-for-rhel-${VERSION}-$(arch)-rpms
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-${VERSION}.noarch.rpm && dnf install -y epel-release
RUN dnf install -y -q gcc-c++ lapack-devel make git ca-certificates
# These usually are not packaged in OS repositories and need to be installed from source
# - JAGS (needed for runjags which itself is again a dependency of many packages)
RUN curl -s -L -O https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Source/JAGS-4.3.2.tar.gz && \
tar -xzf JAGS-4.3.2.tar.gz && cd JAGS-4.3.2 && ./configure --enable-silent-rules && make 2>&1

View file

@ -1,68 +0,0 @@
ARG OS_VERSION
FROM devxygmbh/ubuntu-jags:${OS_VERSION} AS jags
ARG OS_VERSION
FROM ubuntu:${OS_VERSION} AS final
ARG R_VERSION
ENV PATH=/opt/R/${R_VERSION}/bin:$PATH
ENV TZ="Europe/Berlin"
ENV DEBIAN_FRONTEND=noninteractive
ENV NCPUS=2
ENV R_LIBS_USER=/mnt/cache/R-pkgs
ENV R_PKG_CACHE_DIR=/mnt/cache/pkgcache
ARG GITHUB_PAT
COPY --link --from=jags /JAGS-4.3.2 /JAGS-4.3.2
# xvfb: for graphical pkgs requiring tcl, like gWidgets2tcltk
# tcl tk tk-dev tk-table: must be available before running xvfb-run (i.e. starting the graphical session)
# libmecab-dev: RcppMeCab -> no autodetection yet
# libfftw3-dev: ravetools -> actually auto-detect but somehow doesn't work in container?
RUN apt update && apt install -y --no-install-recommends gdebi-core g++ gfortran libbz2-dev libblas-dev libicu-dev liblapack-dev liblzma-dev libpaper-utils libpcre2-dev libtcl8.6 libtk8.6 libxt6 unzip zip zlib1g-dev libpcre3-dev libopenblas-dev curl ca-certificates make ccache htop libgit2-dev git libpq-dev libxml2-dev libgit2-dev cmake xvfb libcurl4-openssl-dev xz-utils tcl tk tk-dev tk-table pkg-config libmecab-dev libfftw3-dev automake
### CUSTOM DEPENDENCIES
# - Chromium should be auto-installed once pkgdepends merges the latest system-requirements rule changes
RUN apt-get install -y software-properties-common && \
add-apt-repository -y ppa:xtradeb/apps && \
apt update && \
apt install -y chromium
ARG OS_VERSION
ARG R_VERSION
RUN if [ "$OS_VERSION" = "jammy" ]; then \
OS_VERSION_TRIM=2204; \
CXX_STD=14; \
elif [ "$OS_VERSION" = "noble" ]; then \
OS_VERSION_TRIM=2404; \
CXX_STD=17; \
fi; \
if [ "$(arch)" = "x86_64" ]; then \
export ARCH=amd64; \
elif [ "$(arch)" = "aarch64" ]; then \
export ARCH=arm64; \
fi; \
curl -v -O "https://devxy-r-builds.fsn1.your-objectstorage.com/${OS_VERSION_TRIM}/r-${R_VERSION}_1_$(dpkg --print-architecture).deb" && \
gdebi -n -qq "r-${R_VERSION}_1_$(dpkg --print-architecture).deb" && \
rm "r-${R_VERSION}_1_$(dpkg --print-architecture).deb" && \
R -q -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/devel/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))' && \
mkdir -p /root/.R && \
bash -c 'echo -e "CXX_STD = $CXX_STD\nCFLAGS += -flax-vector-conversions\nCC=ccache gcc\nCPP=gcc -E\nCXXCPP=gcc -e\nCXX=ccache g++\nCXX11=ccache g++\nCXX14=ccache g++\nCXX17=ccache g++\nF77=gfortran\nFC=gfortran" >> /root/.R/Makevars' && \
bash -c 'echo -e "options(pkg.sysreqs_verbose = TRUE, crayon.enabled = TRUE, Ncpus = ${NCPUS}, future.globals.onReference = NULL, repos = structure(c(CRAN = \"https://cran.devxy.io/$ARCH/${OS_VERSION}/latest\", INLA = \"https://inla.r-inla-download.org/R/stable\")))" > ~/.Rprofile'
### Makevars
# dbarts: CFLAGS += -flax-vector-conversions (https://github.com/vdorie/dbarts/issues/66)
# can't set ccache for gfortran because of https://gitlab.com/roigrp/solver/highs/-/issues/4
# these dirs will later be used by the CI with existing mounts
RUN mkdir -p /mnt/cache/packages /mnt/cache/pkgcache /mnt/cache/R-pkgs
RUN apt install -y locales && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
&& locale-gen en_US.utf8 \
&& /usr/sbin/update-locale LANG=en_US.UTF-8
RUN R -q -e 'getOption("repos"); pak::pak("git::https://codefloe.com/rpkgs/bincraftr.git", dependencies = TRUE)'
CMD ["/bin/bash"]

View file

@ -1,7 +0,0 @@
ARG VERSION
FROM ubuntu:${VERSION} AS jags
RUN apt update && apt install -y --no-install-recommends curl make ca-certificates gcc g++ gfortran liblapack-dev
# These usually are not packaged in OS repositories and need to be installed from source
# - JAGS (needed for runjags which itself is again a dependency of many packages)
RUN curl -q -L -O https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Source/JAGS-4.3.2.tar.gz && tar -xzf JAGS-4.3.2.tar.gz && cd JAGS-4.3.2 && ./configure --enable-silent-rules && make 2>&1