use workaround in docker files for dep install

This commit is contained in:
Patrick Schratz 2024-09-03 18:49:13 +02:00
commit f50610c789
Signed by: pat-s
GPG key ID: 3C6318841EF78925
5 changed files with 13 additions and 9 deletions

View file

@ -30,8 +30,8 @@ RUN apk add --allow-untrusted r-4.4.1_1_aarch64.apk && rm r-4.4.1_1_aarch64.apk
RUN R -q -e 'install.packages("remotes", repo = "cloud.r-project.org"); remotes::install_github("pat-s/pak@alpine")'
COPY . .
RUN R -q -e 'Sys.setenv(PKG_SYSREQS = TRUE, PKG_SYSREQS_VERBOSE = TRUE, PKG_SYSREQS_PLATFORM = "alpine"); pak::pak()'
RUN R -q -e 'Sys.setenv(PKG_SYSREQS = TRUE, PKG_SYSREQS_VERBOSE = TRUE, PKG_SYSREQS_PLATFORM = "alpine"); pak::pak("devtools")'
# FIXME: switch to pak after https://github.com/r-lib/pak/issues/628
RUN R -q -e 'Sys.setenv(PKG_SYSREQS = TRUE, PKG_SYSREQS_VERBOSE = TRUE); options(Ncpus = 4, repos = structure(c(devxy = "https://cran.devxy.io/arm64/alpine320/latest", CRAN = "https://cloud.r-project.org"))); install.packages("remotes"); remotes::install_deps()'
RUN rm -rf arm-binaries-r
CMD ["/bin/bash"]

View file

@ -20,7 +20,8 @@ RUN dnf install -q -y R-4.4.1-1-1.aarch64.rpm
RUN R -q -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))'
COPY . .
RUN R -q -e 'Sys.setenv(PKG_SYSREQS = TRUE, PKG_SYSREQS_VERBOSE = TRUE, PKG_SYSREQS_PLATFORM = "redhat"); options(repos = c(devxy = "https://cran.devxy.io/arm64/rhel8/latest", CRAN = "https://cloud.r-project.org")); pak::pak()'
# FIXME: switch to pak after https://github.com/r-lib/pak/issues/628
RUN R -q -e 'Sys.setenv(PKG_SYSREQS = TRUE, PKG_SYSREQS_VERBOSE = TRUE); options(Ncpus = 4, repos = structure(c(devxy = "https://cran.devxy.io/arm64/rhel8/latest", CRAN = "https://cloud.r-project.org"))); install.packages("remotes"); remotes::install_deps()'
RUN rm -rf arm-binaries-r
CMD ["/bin/bash"]

View file

@ -3,11 +3,11 @@ FROM redhat/ubi9:9.4-1181.1724035907
ARG RED_HAT_DEV_PW
ENV PATH=/opt/R/4.4.1/bin:$PATH
ENV TZ="Europe/Berlin"
ARG GITHUB_PAT
RUN subscription-manager register --username mail@devxy.io --password "$RED_HAT_DEV_PW" && subscription-manager repos --enable codeready-builder-for-rhel-9-aarch64-rpms
RUN subscription-manager register --username devxy --password "$RED_HAT_DEV_PW" && subscription-manager repos --enable codeready-builder-for-rhel-9-aarch64-rpms
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && dnf install -y epel-release
RUN dnf install -y -q lapack-devel git gcc g++ fontconfig-devel fribidi-devel libjpeg-turbo-devel libtiff-devel htop libgit2-devel
RUN dnf install -y -q https://dl.fedoraproject.org/pub/epel/9/Everything/aarch64/Packages/h/hiredis-1.0.2-2.el9.aarch64.rpm && dnf install -y -q https://dl.fedoraproject.org/pub/epel/9/Everything/aarch64/Packages/c/ccache-4.5.1-2.el9.aarch64.rpm
RUN dnf install -y -q lapack-devel git gcc g++ fontconfig-devel fribidi-devel libjpeg-turbo-devel libtiff-devel htop libgit2-devel hiredis ccache
### CUSTOM DEPENDENCIES
# These usually are not packaged in OS repositories and need to be installed from source
@ -20,7 +20,8 @@ RUN dnf install -q -y R-4.4.1-1-1.aarch64.rpm
RUN R -q -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))'
COPY . .
RUN R -q -e 'Sys.setenv(PKG_SYSREQS = TRUE, PKG_SYSREQS_VERBOSE = TRUE, PKG_SYSREQS_PLATFORM = "redhat"); options(repos = c(devxy = "https://cran.devxy.io/arm64/rhel9/latest", CRAN = "cloud.r-project.org")); pak::pak()'
# FIXME: switch to pak after https://github.com/r-lib/pak/issues/628
RUN R -q -e 'Sys.setenv(PKG_SYSREQS = TRUE, PKG_SYSREQS_VERBOSE = TRUE); options(Ncpus = 4, repos = structure(c(devxy = "https://cran.devxy.io/arm64/rhel9/latest", CRAN = "https://cloud.r-project.org"))); install.packages("remotes"); remotes::install_deps()'
RUN rm -rf arm-binaries-r
CMD ["/bin/bash"]

View file

@ -16,7 +16,8 @@ RUN gdebi -n -qq r-4.4.1_1_arm64.deb && rm r-4.4.1_1_arm64.deb
RUN R -q -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))'
COPY . .
RUN R -q -e 'Sys.setenv(PKG_SYSREQS = TRUE, PKG_SYSREQS_VERBOSE = TRUE, PKG_SYSREQS_PLATFORM = "ubuntu"); options(repos = c(devxy = "https://cran.devxy.io/arm64/jammy/latest", CRAN = "cloud.r-project.org")); pak::pak()'
# FIXME: switch to pak after https://github.com/r-lib/pak/issues/628
RUN R -q -e 'Sys.setenv(PKG_SYSREQS = TRUE, PKG_SYSREQS_VERBOSE = TRUE); options(Ncpus = 4, repos = structure(c(devxy = "https://cran.devxy.io/arm64/jammy/latest", CRAN = "https://cloud.r-project.org"))); install.packages("remotes"); remotes::install_deps()'
RUN rm -rf arm-binaries-r
CMD ["/bin/bash"]

View file

@ -16,7 +16,8 @@ RUN gdebi -n -qq r-4.4.1_1_arm64.deb && rm r-4.4.1_1_arm64.deb
RUN R -q -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))'
COPY . .
RUN R -q -e 'Sys.setenv(PKG_SYSREQS = TRUE, PKG_SYSREQS_VERBOSE = TRUE, PKG_SYSREQS_PLATFORM = "ubuntu"); options(repos = c(devxy = "https://cran.devxy.io/arm64/noble/latest", CRAN = "https://cloud.r-project.org")); pak::pak()'
# FIXME: switch to pak after https://github.com/r-lib/pak/issues/628
RUN R -q -e 'Sys.setenv(PKG_SYSREQS = TRUE, PKG_SYSREQS_VERBOSE = TRUE); options(Ncpus = 4, repos = structure(c(devxy = "https://cran.devxy.io/arm64/noble/latest", CRAN = "https://cloud.r-project.org"))); install.packages("remotes"); remotes::install_deps()'
RUN rm -rf arm-binaries-r
CMD ["/bin/bash"]