From 7ceb06323efb21fde27936a98efb8ab1fa880099 Mon Sep 17 00:00:00 2001 From: pat-s Date: Fri, 13 Dec 2024 16:19:11 +0100 Subject: [PATCH] dynamic dep installs in images --- docker/Containerfile-alpine-320 | 5 +---- docker/Containerfile-alpine-321 | 5 +---- docker/Containerfile-redhat-8 | 8 ++------ docker/Containerfile-redhat-9 | 8 ++------ docker/Containerfile-ubuntu-2204 | 6 ++---- docker/Containerfile-ubuntu-2404 | 6 ++---- 6 files changed, 10 insertions(+), 28 deletions(-) diff --git a/docker/Containerfile-alpine-320 b/docker/Containerfile-alpine-320 index 5ef406a..fa17153 100644 --- a/docker/Containerfile-alpine-320 +++ b/docker/Containerfile-alpine-320 @@ -65,12 +65,9 @@ RUN R -q -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/ # 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 -# FIXME: switch to pak after https://github.com/r-lib/pak/issues/628 -# deps from pak::pkg_deps(".")$package -RUN R -q -e 'pak::pak(c("DBI", "R6", "RPostgres", "Rcpp", "askpass", "base64enc", "bit64", "bit", "blob", "callr", "cli", "credentials", "curl", "data.table", "desc", "digest", "dplyr", "fansi", "fs", "future.apply", "future", "generics", "gert", "globals", "glue", "hms", "httr", "jsonlite", "lgr", "lifecycle", "listenv", "lubridate", "magrittr", "mime", "openssl", "parallelly", "paws.common", "paws.storage", "pillar", "pkgbuild", "pkgconfig", "processx", "progressr", "ps", "purrr", "rlang", "rstudioapi", "s3fs", "stringi", "stringr", "sys", "tibble", "tidyselect", "timechange", "utf8", "vctrs", "withr", "xml2", "zip", "codetools", "cranlike", "RSQLite", "cachem", "crayon", "debugme", "fastmap", "memoise", "progress", "future.callr", "dbplyr"))' # 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://gitlab.com/devxy/r-package-binaries/bincraftr.git")' +RUN R -q -e 'pak::pak("git::https://gitlab.com/devxy/r-package-binaries/bincraftr.git", dependencies = TRUE)' CMD ["/bin/bash"] \ No newline at end of file diff --git a/docker/Containerfile-alpine-321 b/docker/Containerfile-alpine-321 index 6585728..b89a7a5 100644 --- a/docker/Containerfile-alpine-321 +++ b/docker/Containerfile-alpine-321 @@ -65,12 +65,9 @@ RUN R -q -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/ # 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 -# FIXME: switch to pak after https://github.com/r-lib/pak/issues/628 -# deps from pak::pkg_deps(".")$package -RUN R -q -e 'pak::pak(c("DBI", "R6", "RPostgres", "Rcpp", "askpass", "base64enc", "bit64", "bit", "blob", "callr", "cli", "credentials", "curl", "data.table", "desc", "digest", "dplyr", "fansi", "fs", "future.apply", "future", "generics", "gert", "globals", "glue", "hms", "httr", "jsonlite", "lgr", "lifecycle", "listenv", "lubridate", "magrittr", "mime", "openssl", "parallelly", "paws.common", "paws.storage", "pillar", "pkgbuild", "pkgconfig", "processx", "progressr", "ps", "purrr", "rlang", "rstudioapi", "s3fs", "stringi", "stringr", "sys", "tibble", "tidyselect", "timechange", "utf8", "vctrs", "withr", "xml2", "zip", "codetools", "cranlike", "RSQLite", "cachem", "crayon", "debugme", "fastmap", "memoise", "progress", "future.callr", "dbplyr"))' # 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://gitlab.com/devxy/r-package-binaries/bincraftr.git")' +RUN R -q -e 'pak::pak("git::https://gitlab.com/devxy/r-package-binaries/bincraftr.git", dependencies = TRUE)' CMD ["/bin/bash"] \ No newline at end of file diff --git a/docker/Containerfile-redhat-8 b/docker/Containerfile-redhat-8 index 7584945..8ea5c63 100644 --- a/docker/Containerfile-redhat-8 +++ b/docker/Containerfile-redhat-8 @@ -45,7 +45,7 @@ RUN dnf install -y chromium ### INSTALL R RUN curl -O "https://devxy-r-builds.s3.eu-central-003.backblazeb2.com/el8/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/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))' +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))' ### Makevars # dbarts: CFLAGS += -flax-vector-conversions (https://github.com/vdorie/dbarts/issues/66) @@ -59,10 +59,6 @@ RUN bash -c 'echo -e "PKG_SYSREQS = TRUE\nPKG_SYSREQS_VERBOSE = TRUE\nPKG_SYSREQ # 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 -# FIXME: switch to pak after https://github.com/r-lib/pak/issues/628 -# deps from pak::pkg_deps(".")$package -RUN R -q -e 'pak::pak(c("DBI", "R6", "RPostgres", "Rcpp", "askpass", "base64enc", "bit64", "bit", "blob", "callr", "cli", "credentials", "curl", "data.table", "desc", "digest", "dplyr", "fansi", "fs", "future.apply", "future", "generics", "gert", "globals", "glue", "hms", "httr", "jsonlite", "lgr", "lifecycle", "listenv", "lubridate", "magrittr", "mime", "openssl", "parallelly", "paws.common", "paws.storage", "pillar", "pkgbuild", "pkgconfig", "processx", "progressr", "ps", "purrr", "rlang", "rstudioapi", "s3fs", "stringi", "stringr", "sys", "tibble", "tidyselect", "timechange", "utf8", "vctrs", "withr", "xml2", "zip", "codetools", "cranlike", "RSQLite", "cachem", "crayon", "debugme", "fastmap", "memoise", "progress", "future.callr", "dbplyr"))' - -RUN R -q -e 'pak::pak("git::https://gitlab.com/devxy/r-package-binaries/bincraftr.git")' +RUN R -q -e 'pak::pak("git::https://gitlab.com/devxy/r-package-binaries/bincraftr.git", dependencies = TRUE)' CMD ["/bin/bash"] \ No newline at end of file diff --git a/docker/Containerfile-redhat-9 b/docker/Containerfile-redhat-9 index 76fffd0..2f1915d 100644 --- a/docker/Containerfile-redhat-9 +++ b/docker/Containerfile-redhat-9 @@ -45,7 +45,7 @@ RUN dnf install -y chromium ### INSTALL R RUN curl -O "https://devxy-r-builds.s3.eu-central-003.backblazeb2.com/el9/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/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))' +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))' ### Makevars # dbarts: CFLAGS += -flax-vector-conversions (https://github.com/vdorie/dbarts/issues/66) @@ -59,10 +59,6 @@ RUN bash -c 'echo -e "PKG_SYSREQS = TRUE\nPKG_SYSREQS_VERBOSE = TRUE\nPKG_SYSREQ # 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 -# FIXME: switch to pak after https://github.com/r-lib/pak/issues/628 -# deps from pak::pkg_deps(".")$package -RUN R -q -e 'pak::pak(c("DBI", "R6", "RPostgres", "Rcpp", "askpass", "base64enc", "bit64", "bit", "blob", "callr", "cli", "credentials", "curl", "data.table", "desc", "digest", "dplyr", "fansi", "fs", "future.apply", "future", "generics", "gert", "globals", "glue", "hms", "httr", "jsonlite", "lgr", "lifecycle", "listenv", "lubridate", "magrittr", "mime", "openssl", "parallelly", "paws.common", "paws.storage", "pillar", "pkgbuild", "pkgconfig", "processx", "progressr", "ps", "purrr", "rlang", "rstudioapi", "s3fs", "stringi", "stringr", "sys", "tibble", "tidyselect", "timechange", "utf8", "vctrs", "withr", "xml2", "zip", "codetools", "cranlike", "RSQLite", "cachem", "crayon", "debugme", "fastmap", "memoise", "progress", "future.callr", "dbplyr"))' - -RUN R -q -e 'pak::pak("git::https://gitlab.com/devxy/r-package-binaries/bincraftr.git")' +RUN R -q -e 'pak::pak("git::https://gitlab.com/devxy/r-package-binaries/bincraftr.git", dependencies = TRUE)' CMD ["/bin/bash"] \ No newline at end of file diff --git a/docker/Containerfile-ubuntu-2204 b/docker/Containerfile-ubuntu-2204 index 79579f2..733cb18 100644 --- a/docker/Containerfile-ubuntu-2204 +++ b/docker/Containerfile-ubuntu-2204 @@ -39,7 +39,7 @@ RUN apt-get install -y software-properties-common && \ ### INSTALL R RUN curl -O "https://devxy-r-builds.s3.eu-central-003.backblazeb2.com/2204/r-${R_VERSION}_1_$(dpkg --print-architecture).deb" RUN gdebi -n -qq "r-${R_VERSION}_1_$(dpkg --print-architecture).deb" && rm "r-${R_VERSION}_1_$(dpkg --print-architecture).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))' +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))' ### Makevars # dbarts: CFLAGS += -flax-vector-conversions (https://github.com/vdorie/dbarts/issues/66) @@ -52,12 +52,10 @@ RUN bash -c 'echo -e "options(pkg.sysreqs_verbose = TRUE, crayon.enabled = TRUE, # 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 "pak::pak(c('DBI', 'R6', 'RPostgres', 'Rcpp', 'askpass', 'base64enc', 'bit64', 'bit', 'blob', 'callr', 'cli', 'credentials', 'curl', 'data.table', 'desc', 'digest', 'dplyr', 'fansi', 'fs', 'future.apply', 'future', 'generics', 'gert', 'globals', 'glue', 'hms', 'httr', 'jsonlite', 'lgr', 'lifecycle', 'listenv', 'lubridate', 'magrittr', 'mime', 'openssl', 'parallelly', 'paws.common', 'paws.storage', 'pillar', 'pkgbuild', 'pkgconfig', 'processx', 'progressr', 'ps', 'purrr', 'rlang', 'rstudioapi', 's3fs', 'stringi', 'stringr', 'sys', 'tibble', 'tidyselect', 'timechange', 'utf8', 'vctrs', 'withr', 'xml2', 'zip', 'codetools', 'cranlike', 'RSQLite', 'cachem', 'crayon', 'debugme', 'fastmap', 'memoise', 'progress', 'future.callr', 'dbplyr'))" - 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 'pak::pak("git::https://gitlab.com/devxy/r-package-binaries/bincraftr.git")' +RUN R -q -e 'pak::pak("git::https://gitlab.com/devxy/r-package-binaries/bincraftr.git", dependencies = TRUE)' CMD ["/bin/bash"] \ No newline at end of file diff --git a/docker/Containerfile-ubuntu-2404 b/docker/Containerfile-ubuntu-2404 index d37300f..da91c70 100644 --- a/docker/Containerfile-ubuntu-2404 +++ b/docker/Containerfile-ubuntu-2404 @@ -39,7 +39,7 @@ RUN apt-get install -y software-properties-common && \ ### INSTALL R RUN curl -O "https://devxy-r-builds.s3.eu-central-003.backblazeb2.com/2404/r-${R_VERSION}_1_$(dpkg --print-architecture).deb" RUN gdebi -n -qq "r-${R_VERSION}_1_$(dpkg --print-architecture).deb" && rm "r-${R_VERSION}_1_$(dpkg --print-architecture).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))' +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))' ### Makevars # dbarts: CFLAGS += -flax-vector-conversions (https://github.com/vdorie/dbarts/issues/66) @@ -52,12 +52,10 @@ RUN bash -c 'echo -e "options(pkg.sysreqs_verbose = TRUE, crayon.enabled = TRUE, # 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 "pak::pak(c('DBI', 'R6', 'RPostgres', 'Rcpp', 'askpass', 'base64enc', 'bit64', 'bit', 'blob', 'callr', 'cli', 'credentials', 'curl', 'data.table', 'desc', 'digest', 'dplyr', 'fansi', 'fs', 'future.apply', 'future', 'generics', 'gert', 'globals', 'glue', 'hms', 'httr', 'jsonlite', 'lgr', 'lifecycle', 'listenv', 'lubridate', 'magrittr', 'mime', 'openssl', 'parallelly', 'paws.common', 'paws.storage', 'pillar', 'pkgbuild', 'pkgconfig', 'processx', 'progressr', 'ps', 'purrr', 'rlang', 'rstudioapi', 's3fs', 'stringi', 'stringr', 'sys', 'tibble', 'tidyselect', 'timechange', 'utf8', 'vctrs', 'withr', 'xml2', 'zip', 'codetools', 'cranlike', 'RSQLite', 'cachem', 'crayon', 'debugme', 'fastmap', 'memoise', 'progress', 'future.callr', 'dbplyr'))" - 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 'pak::pak("git::https://gitlab.com/devxy/r-package-binaries/bincraftr.git")' +RUN R -q -e 'pak::pak("git::https://gitlab.com/devxy/r-package-binaries/bincraftr.git", dependencies = TRUE)' CMD ["/bin/bash"] \ No newline at end of file