Skip to content
Snippets Groups Projects
Verified Commit 1480bb65 authored by Olivier Benz's avatar Olivier Benz
Browse files

Freeze R v4.2.0

parent 731cb7a3
No related branches found
No related tags found
No related merge requests found
Pipeline #11111 passed
......@@ -47,6 +47,8 @@ build-version:
--build-arg R_VERSION
--build-arg NCPUS=$((`nproc`/2+1))
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN_PAT
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ
-f geospatial/$R_VERSION.Dockerfile .
- docker push -a $CI_REGISTRY_IMAGE
rules:
......
ARG R_VERSION=4.2.0
FROM registry.gitlab.b-data.ch/rocker/verse:${R_VERSION}
ARG NCPUS=1
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
gdal-bin \
libfftw3-dev \
libgdal-dev \
libgeos-dev \
libgsl0-dev \
libhdf4-alt-dev \
libhdf5-dev \
libjq-dev \
libproj-dev \
libprotobuf-dev \
libnetcdf-dev \
libudunits2-dev \
netcdf-bin \
postgis \
protobuf-compiler \
sqlite3 \
tk-dev \
unixodbc-dev \
&& install2.r --error --skipinstalled -n $NCPUS \
RColorBrewer \
RNetCDF \
classInt \
deldir \
gstat \
hdf5r \
lidR \
mapdata \
maptools \
mapview \
ncdf4 \
proj4 \
raster \
rgdal \
rgeos \
rlas \
sf \
sp \
spacetime \
spatstat \
spatialreg \
spdep \
stars \
terra \
tidync \
tmap \
geosphere \
## Archived on 2022-05-04 as check problems were not corrected in time.
&& Rscript -e "devtools::install_version('RandomFields', version = '3.3.14')" \
## Archived on 2022-05-04 as requires archived package 'RandomFields'.
&& Rscript -e "devtools::install_version('geoR', version = '1.8-1')" \
## from bioconductor
&& R -e "BiocManager::install('rhdf5', update = FALSE, ask = FALSE)" \
## Clean up
&& rm -rf /tmp/* \
&& rm -rf /var/lib/apt/lists/*
## Install wgrib2 for NOAA's NOMADS / rNOMADS forecast files
#RUN cd /opt \
# && wget https://www.ftp.cpc.ncep.noaa.gov/wd51we/wgrib2/wgrib2.tgz \
# && tar -xvf wgrib2.tgz \
# && rm -rf wgrib2.tgz \
# && cd grib2 \
# && CC=gcc FC=gfortran make \
# && ln -s /opt/grib2/wgrib2/wgrib2 /usr/local/bin/wgrib2
......@@ -168,6 +168,20 @@ build-manifest:version-linux-multiarch:
$CI_APP_REPO:$CI_APP_TAG-linux-arm64v8
fi
docker manifest push $CI_APP_REPO:$CI_APP_TAG
- |
docker manifest create $CI_APP_REPO:$VERSION_MAJ_MIN $CI_MANIFEST_LIST
if echo $OS_ARCH | grep "linux-arm64v8" >/dev/null ; then
docker manifest annotate --variant v8 $CI_APP_REPO:$VERSION_MAJ_MIN \
$CI_APP_REPO:$CI_APP_TAG-linux-arm64v8
fi
docker manifest push $CI_APP_REPO:$VERSION_MAJ_MIN
- |
docker manifest create $CI_APP_REPO:$VERSION_MAJ $CI_MANIFEST_LIST
if echo $OS_ARCH | grep "linux-arm64v8" >/dev/null ; then
docker manifest annotate --variant v8 $CI_APP_REPO:$VERSION_MAJ \
$CI_APP_REPO:$CI_APP_TAG-linux-arm64v8
fi
docker manifest push $CI_APP_REPO:$VERSION_MAJ
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version"
changes:
......
ARG IMAGE=debian:bullseye
ARG BLAS=libopenblas-dev
ARG R_VERSION=4.2.0
ARG CRAN=https://cran.rstudio.com
FROM registry.gitlab.b-data.ch/r/rsi/${R_VERSION}/${IMAGE} as rsi
FROM ${IMAGE}
LABEL org.opencontainers.image.licenses="GPL-2.0" \
org.opencontainers.image.source="https://gitlab.b-data.ch/rocker/docker-stack" \
org.opencontainers.image.vendor="b-data GmbH" \
org.opencontainers.image.authors="Olivier Benz <olivier.benz@b-data.ch>"
ARG IMAGE
ARG DEBIAN_FRONTEND=noninteractive
ARG BLAS
ARG R_VERSION
ARG CRAN
ARG BUILD_DATE
ENV BASE_IMAGE=${IMAGE} \
BUILD_DATE=${BUILD_DATE:-2022-06-23} \
R_VERSION=${R_VERSION} \
CRAN=${CRAN} \
LANG=en_US.UTF-8 \
TERM=xterm \
TZ=Etc/UTC
COPY --from=rsi /usr/local /usr/local
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bash-completion \
build-essential \
ca-certificates \
devscripts \
file \
fonts-texgyre \
g++ \
gfortran \
gsfonts \
libbz2-dev \
'^libcurl[3|4]$' \
libicu-dev \
'^libjpeg.*-turbo.*-dev$' \
liblapack-dev \
liblzma-dev \
${BLAS} \
libpangocairo-1.0-0 \
libpaper-utils \
'^libpcre[2|3]-dev$' \
libpng-dev \
libreadline-dev \
libtiff5 \
locales \
pkg-config \
unzip \
zip \
zlib1g \
## Switch BLAS/LAPACK (manual mode)
&& if [ ${BLAS} = "libopenblas-dev" ]; then \
update-alternatives --set libblas.so.3-$(uname -m)-linux-gnu \
/usr/lib/$(uname -m)-linux-gnu/openblas-pthread/libblas.so.3; \
update-alternatives --set liblapack.so.3-$(uname -m)-linux-gnu \
/usr/lib/$(uname -m)-linux-gnu/openblas-pthread/liblapack.so.3; \
fi \
## Update locale
&& sed -i "s/# $LANG/$LANG/g" /etc/locale.gen \
&& locale-gen \
&& update-locale LANG=$LANG \
## Add a library directory (for user-installed packages)
&& mkdir -p /usr/local/lib/R/site-library \
&& chown root:staff /usr/local/lib/R/site-library \
&& chmod g+ws /usr/local/lib/R/site-library \
## Set configured CRAN mirror
&& if [ -z "$BUILD_DATE" ]; then MRAN=$CRAN; \
else MRAN=https://mran.microsoft.com/snapshot/${BUILD_DATE}; fi \
&& echo MRAN=$MRAN >> /etc/environment \
&& echo "options(repos = c(CRAN='$MRAN'), download.file.method = 'libcurl')" >> /usr/local/lib/R/etc/Rprofile.site \
## Use littler installation scripts
&& Rscript -e "install.packages(c('littler', 'docopt'), repos = '$MRAN')" \
&& ln -s /usr/local/lib/R/site-library/littler/examples/install2.r /usr/local/bin/install2.r \
&& ln -s /usr/local/lib/R/site-library/littler/examples/installGithub.r /usr/local/bin/installGithub.r \
&& ln -s /usr/local/lib/R/site-library/littler/bin/r /usr/local/bin/r \
## Clean up
&& rm -rf /tmp/* \
&& rm -rf /var/lib/apt/lists/*
CMD ["R"]
......@@ -45,6 +45,8 @@ build-version:
cd rstudio && docker build --pull
--build-arg R_VERSION
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN_PAT
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ
-f $R_VERSION.Dockerfile .
- docker push -a $CI_REGISTRY_IMAGE
rules:
......
ARG IMAGE=debian:bullseye
ARG R_VERSION=4.2.0
ARG GIT_VERSION=2.36.1
ARG RSTUDIO_VERSION=2022.02.3+492
ARG S6_VERSION=v2.2.0.3
FROM registry.gitlab.b-data.ch/git/gsi/${GIT_VERSION}/${IMAGE} as gsi
FROM registry.gitlab.b-data.ch/r/r-ver:${R_VERSION}
ARG DEBIAN_FRONTEND=noninteractive
ARG GIT_VERSION
ARG RSTUDIO_VERSION
ARG S6_VERSION
ENV GIT_VERSION=${GIT_VERSION} \
RSTUDIO_VERSION=${RSTUDIO_VERSION} \
S6_VERSION=${S6_VERSION} \
S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \
PATH=/usr/lib/rstudio-server/bin:$PATH
COPY --from=gsi /usr/local /usr/local
COPY --from=gsi /etc/bash_completion.d /etc/bash_completion.d
## Download and install RStudio server & dependencies
## Attempts to detect latest version, otherwise falls back to $RSTUDIO_VERSION
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
file \
libapparmor1 \
libclang-dev \
libcurl4-openssl-dev \
libedit2 \
libpq-dev \
libssl-dev \
lsb-release \
nano \
psmisc \
procps \
python-setuptools \
sudo \
wget \
## Additional git runtime dependencies
libcurl3-gnutls \
liberror-perl \
## Additional git runtime recommendations
less \
ssh-client \
&& if [ -z "$RSTUDIO_VERSION" ]; \
then wget "https://www.rstudio.org/download/latest/stable/server/bionic/rstudio-server-latest-amd64.deb"; \
else /bin/bash -c 'wget "http://download2.rstudio.org/server/bionic/amd64/rstudio-server-${RSTUDIO_VERSION/'+'/'-'}-amd64.deb"'; \
fi \
&& dpkg -i rstudio-server-*-amd64.deb \
&& rm rstudio-server-*-amd64.deb \
## https://github.com/rocker-org/rocker-versioned2/issues/137
rm -f /var/lib/rstudio-server/secure-cookie-key \
## Symlink pandoc, pandoc-citeproc so they are available system-wide
&& if [ -f "/usr/lib/rstudio-server/bin/pandoc/pandoc" ]; then \
BUNDLED_PANDOC="/usr/lib/rstudio-server/bin/pandoc/pandoc"; \
elif [ -f "/usr/lib/rstudio-server/bin/quarto/bin/pandoc" ]; then \
BUNDLED_PANDOC="/usr/lib/rstudio-server/bin/quarto/bin/pandoc"; \
elif [ -f "/usr/lib/rstudio-server/bin/quarto/bin/tools/pandoc" ]; then \
BUNDLED_PANDOC="/usr/lib/rstudio-server/bin/quarto/bin/tools/pandoc"; \
fi \
&& ln -s "$BUNDLED_PANDOC" /usr/local/bin \
&& if [ -f "${BUNDLED_PANDOC}-citeproc" ]; then \
ln -s "${BUNDLED_PANDOC}-citeproc" /usr/local/bin; \
fi \
## Symlink pandoc & standard pandoc templates for use system-wide
&& PANDOC_TEMPLATES_VERSION=$(pandoc -v | grep -oP "(?<=pandoc\s)[0-9\.]+$") \
&& wget "https://github.com/jgm/pandoc-templates/archive/${PANDOC_TEMPLATES_VERSION}.tar.gz" -O pandoc-templates.tar.gz \
&& rm -rf /opt/pandoc/templates \
&& mkdir -p /opt/pandoc/templates \
&& tar xvf pandoc-templates.tar.gz \
&& cp -r pandoc-templates*/* /opt/pandoc/templates && rm -rf pandoc-templates* \
&& rm -rf /root/.pandoc \
&& mkdir /root/.pandoc && ln -s /opt/pandoc/templates /root/.pandoc/templates \
## RStudio wants an /etc/R, will populate from $R_HOME/etc
&& mkdir -p /etc/R \
&& echo "PATH=${PATH}" >> /usr/local/lib/R/etc/Renviron.site \
## Need to configure non-root user for RStudio
&& useradd rstudio \
&& echo "rstudio:rstudio" | chpasswd \
&& mkdir /home/rstudio \
&& chown rstudio:rstudio /home/rstudio \
&& addgroup rstudio staff \
## Prevent rstudio from deciding to use /usr/bin/R if a user apt-get installs a package
&& echo 'rsession-which-r=/usr/local/bin/R' >> /etc/rstudio/rserver.conf \
## use more robust file locking to avoid errors when using shared volumes:
&& echo 'lock-type=advisory' >> /etc/rstudio/file-locks \
## Set default branch name to main
&& git config --system init.defaultBranch main \
## Store passwords for one hour in memory
&& git config --system credential.helper "cache --timeout=3600" \
## Merge the default branch from the default remote when "git pull" is run
&& git config --system pull.rebase false \
# Push the current branch with the same name on the remote
&& git config --system push.default simple \
## Set up S6 init system
&& wget -P /tmp/ https://github.com/just-containers/s6-overlay/releases/download/${S6_VERSION}/s6-overlay-amd64.tar.gz \
## need the modified double tar now, see https://github.com/just-containers/s6-overlay/issues/288
&& tar hzxf /tmp/s6-overlay-amd64.tar.gz -C / --exclude=usr/bin/execlineb \
&& tar hzxf /tmp/s6-overlay-amd64.tar.gz -C /usr ./bin/execlineb && $_clean \
## Set up RStudio init scripts
&& mkdir -p /etc/services.d/rstudio \
&& echo '#!/usr/bin/with-contenv bash \
\n## load /etc/environment vars first: \
\nfor line in $( cat /etc/environment ) ; do export $line > /dev/null; done \
\nexec /usr/lib/rstudio-server/bin/rserver --server-daemonize 0' \
> /etc/services.d/rstudio/run \
&& echo '#!/bin/bash \
\nrstudio-server stop' \
> /etc/services.d/rstudio/finish \
## Log to syslog
&& echo '[*] \
\nlog-level=warn \
\nlogger-type=syslog' \
> /etc/rstudio/logging.conf \
## Rocker's default RStudio settings, for better reproducibility
&& mkdir -p /home/rstudio/.rstudio/monitored/user-settings \
&& echo 'alwaysSaveHistory="0" \
\nloadRData="0" \
\nsaveAction="0"' \
> /home/rstudio/.rstudio/monitored/user-settings/user-settings \
&& chown -R rstudio:rstudio /home/rstudio/.rstudio \
## Clean up
&& rm -rf /tmp/* \
&& rm -rf /var/lib/apt/lists/*
COPY userconf.sh /etc/cont-init.d/userconf
## running with "-e ADD=shiny" adds shiny server
COPY add_shiny.sh /etc/cont-init.d/add
COPY disable_auth_rserver.conf /etc/rstudio/disable_auth_rserver.conf
COPY pam-helper.sh /usr/lib/rstudio-server/bin/pam-helper
EXPOSE 8787
CMD ["/init"]
......@@ -47,6 +47,8 @@ build-version:
--build-arg R_VERSION
--build-arg NCPUS=$((`nproc`/2+1))
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN_PAT
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ
-f tidyverse/$R_VERSION.Dockerfile .
- docker push -a $CI_REGISTRY_IMAGE
rules:
......
ARG R_VERSION=4.2.0
FROM registry.gitlab.b-data.ch/rocker/rstudio:${R_VERSION}
ARG NCPUS=1
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y --no-install-recommends install \
cmake \
libxml2-dev \
libcairo2-dev \
libsqlite3-dev \
libmariadb-dev \
libssh2-1-dev \
unixodbc-dev \
libsasl2-dev \
libtiff-dev \
libharfbuzz-dev \
libfribidi-dev \
libgit2-dev \
libxtst6 \
&& install2.r --error -n $NCPUS BiocManager \
&& install2.r --error --deps TRUE --skipinstalled -n $NCPUS \
tidyverse \
dplyr \
devtools \
formatR \
## dplyr database backends
&& install2.r --error --skipinstalled -n $NCPUS \
arrow \
duckdb \
fst \
## Clean up
&& rm -rf /tmp/* \
&& rm -rf /var/lib/apt/lists/*
......@@ -47,6 +47,8 @@ build-version:
--build-arg R_VERSION
--build-arg NCPUS=$((`nproc`/2+1))
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN_PAT
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ
-f verse/$R_VERSION.Dockerfile .
- docker push -a $CI_REGISTRY_IMAGE
rules:
......
ARG R_VERSION=4.2.0
ARG CTAN_REPO=https://www.texlive.info/tlnet-archive/2022/06/23/tlnet
FROM registry.gitlab.b-data.ch/rocker/tidyverse:${R_VERSION}
ARG NCPUS=1
ARG DEBIAN_FRONTEND=noninteractive
ARG CTAN_REPO
ENV CTAN_REPO=${CTAN_REPO} \
PATH=/opt/TinyTeX/bin/linux:$PATH
## Add LaTeX, rticles and bookdown support
RUN wget "https://travis-bin.yihui.name/texlive-local.deb" \
&& dpkg -i texlive-local.deb \
&& rm texlive-local.deb \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
cargo \
curl \
default-jdk \
fonts-roboto \
ghostscript \
hugo \
lbzip2 \
libbz2-dev \
libglpk-dev \
libgmp3-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
libicu-dev \
liblzma-dev \
libhunspell-dev \
libmagick++-dev \
libopenmpi-dev \
libpoppler-cpp-dev \
# librdf0-dev depends on libcurl4-gnutls-dev
librdf0-dev \
libnode-dev \
libzmq3-dev \
qpdf \
texinfo \
vim \
## Install R package redland
&& install2.r --error --skipinstalled -n $NCPUS redland \
## Explicitly install runtime library sub-deps of librdf0-dev
&& apt-get install -y \
libcurl4-openssl-dev \
libxslt-dev \
librdf0 \
redland-utils \
rasqal-utils \
raptor2-utils \
## Get rid of librdf0-dev and its dependencies (incl. libcurl4-gnutls-dev)
&& apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/* \
## Admin-based install of TinyTeX:
&& wget -qO- "https://yihui.org/tinytex/install-unx.sh" \
| sh -s - --admin --no-path \
&& mv ~/.TinyTeX /opt/TinyTeX \
&& ln -rs /opt/TinyTeX/bin/$(uname -m)-linux \
/opt/TinyTeX/bin/linux \
&& /opt/TinyTeX/bin/linux/tlmgr path add \
&& tlmgr update --self \
&& tlmgr install \
ae \
cm-super \
context \
dvipng \
listings \
makeindex \
parskip \
pdfcrop \
&& tlmgr path add \
&& Rscript -e "tinytex::r_texmf()" \
&& chown -R root:staff /opt/TinyTeX \
&& chmod -R g+w /opt/TinyTeX \
&& chmod -R g+wx /opt/TinyTeX/bin \
&& echo "PATH=${PATH}" >> /usr/local/lib/R/etc/Renviron.site \
&& install2.r --error --skipinstalled -n $NCPUS PKI \
## And some nice R packages for publishing-related stuff
&& install2.r --error --deps TRUE --skipinstalled -n $NCPUS \
blogdown \
bookdown \
distill \
rticles \
rmdshower \
rJava \
xaringan \
## Clean up
&& rm -rf /tmp/*
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment