diff --git a/docker/Dockerfile-alpine-320 b/docker/Dockerfile-alpine-320 index 1fe07f7..f0ac513 100644 --- a/docker/Dockerfile-alpine-320 +++ b/docker/Dockerfile-alpine-320 @@ -41,8 +41,8 @@ RUN bash -c 'echo -e "options(crayon.enabled = TRUE, Ncpus = ${NCPUS}, future.gl RUN bash -c 'echo -e "PKG_SYSREQS=TRUE\nPKG_SYSREQS_VERBOSE=TRUE" > ~/.Renviron' ### INSTALL R -RUN curl -O https://devxy-r-builds.s3.eu-central-2.amazonaws.com/alpine320/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 curl -O "https://devxy-r-builds.s3.eu-central-2.amazonaws.com/alpine320/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("remotes", repo = "cloud.r-project.org"); remotes::install_github("pat-s/pak@alpine")' @@ -52,7 +52,7 @@ RUN R -q -e 'pak::pak(c("DBI", "R6", "RPostgres", "Rcpp", "askpass", "base64enc" COPY . . # remove secrets from COPY -RUN rm /.Renviron /.envrc +RUN touch /.Renviron /.envrc && rm /.Renviron /.envrc RUN R CMD INSTALL . && rm -rf r-pkg-binaries CMD ["/bin/bash"] \ No newline at end of file diff --git a/docker/Dockerfile-redhat-8 b/docker/Dockerfile-redhat-8 index a6e1253..57e0654 100644 --- a/docker/Dockerfile-redhat-8 +++ b/docker/Dockerfile-redhat-8 @@ -25,8 +25,8 @@ RUN dnf install -y -q make lapack-devel git gcc gcc-c++ fontconfig-devel fribidi 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 >/dev/null && rm -rf JAGS-4.3.2.tar.gz JAGS-4.3.2 && cd .. ### INSTALL R -RUN curl -O https://devxy-r-builds.s3.eu-central-2.amazonaws.com/el8/R-${R_VERSION}-1-1.aarch64.rpm -RUN dnf install -q -y R-${R_VERSION}-1-1.aarch64.rpm +RUN curl -O "https://devxy-r-builds.s3.eu-central-2.amazonaws.com/el8/R-${R_VERSION}-1-1.aarch64.rpm" +RUN dnf install -q -y "R-${R_VERSION}-1-1.aarch64.rpm" && rm "R-${R_VERSION}-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))' # Makevars @@ -42,7 +42,7 @@ RUN R -q -e 'pak::pak(c("DBI", "R6", "RPostgres", "Rcpp", "askpass", "base64enc" COPY . . # remove secrets from COPY -RUN rm /.Renviron /.envrc +RUN touch /.Renviron /.envrc && rm /.Renviron /.envrc RUN R CMD INSTALL . && rm -rf r-pkg-binaries CMD ["/bin/bash"] \ No newline at end of file diff --git a/docker/Dockerfile-redhat-9 b/docker/Dockerfile-redhat-9 index 7358c1d..ed8c803 100644 --- a/docker/Dockerfile-redhat-9 +++ b/docker/Dockerfile-redhat-9 @@ -25,8 +25,8 @@ RUN dnf install -y -q make lapack-devel git gcc gcc-c++ fontconfig-devel fribidi 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 >/dev/null && rm -rf JAGS-4.3.2.tar.gz JAGS-4.3.2 && cd .. ### INSTALL R -RUN curl -O https://devxy-r-builds.s3.eu-central-2.amazonaws.com/el9/R-${R_VERSION}-1-1.aarch64.rpm -RUN dnf install -q -y R-${R_VERSION}-1-1.aarch64.rpm +RUN curl -O "https://devxy-r-builds.s3.eu-central-2.amazonaws.com/el9/R-${R_VERSION}-1-1.aarch64.rpm" +RUN dnf install -q -y "R-${R_VERSION}-1-1.aarch64.rpm" && rm "R-${R_VERSION}-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))' # Makevars @@ -34,15 +34,12 @@ RUN mkdir -p /root/.R && bash -c 'echo -e "CXX_STD = CXX14\nCC=ccache gcc\nCPP=c # 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" > /root/.Renviron' - -# 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", "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", "RSQLite", "cachem", "crayon", "debugme", "fastmap", "memoise", "pat-s/cranlike@s3", "pat-s/desc@description-from-remote"))' COPY . . + +RUN R -q -e 'pak::local_install_deps()' # remove secrets from COPY -RUN rm /.Renviron /.envrc +RUN touch /.Renviron /.envrc && rm /.Renviron /.envrc RUN R CMD INSTALL . && rm -rf r-pkg-binaries CMD ["/bin/bash"] \ No newline at end of file diff --git a/docker/Dockerfile-ubuntu-2204 b/docker/Dockerfile-ubuntu-2204 index 10d2893..9a8b547 100644 --- a/docker/Dockerfile-ubuntu-2204 +++ b/docker/Dockerfile-ubuntu-2204 @@ -15,7 +15,7 @@ ENV PGPASS="" ARG GITHUB_PAT # xvfb: for graphical pkgs requiring tcl, like gWidgets2tcltk -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 +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 ### CUSTOM DEPENDENCIES # These usually are not packaged in OS repositories and need to be installed from source @@ -23,24 +23,21 @@ RUN apt update && apt install -y --no-install-recommends gdebi-core g++ gfortran 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 >/dev/null && rm -rf JAGS-4.3.2.tar.gz JAGS-4.3.2 && cd .. ### INSTALL R -RUN curl -O https://devxy-r-builds.s3.eu-central-2.amazonaws.com/2204/r-${R_VERSION}_1_arm64.deb -RUN gdebi -n -qq r-${R_VERSION}_1_arm64.deb && rm r-${R_VERSION}_1_arm64.deb +RUN curl -O "https://devxy-r-builds.s3.eu-central-2.amazonaws.com/2204/r-${R_VERSION}_1_arm64.deb" +RUN gdebi -n -qq "r-${R_VERSION}_1_arm64.deb" && "rm r-${R_VERSION}_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))' # Makevars RUN mkdir -p /root/.R && bash -c 'echo -e "CXX_STD = CXX14\nCC=ccache gcc\nCPP=ccache gcc\nCXX=ccache g++\nCXX11=ccache g++\nCXX14=ccache g++\nCXX17=ccache g++\nF77=ccache /usr/bin/gfortran\nFC=ccache /usr/bin/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" > /root/.Renviron' - -# 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", "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", "RSQLite", "cachem", "crayon", "debugme", "fastmap", "memoise", "pat-s/cranlike@s3", "pat-s/desc@description-from-remote"))' +RUN bash -c 'echo -e "options(pkg.sysreqs_verbose = TRUE, 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\")))" > ~/.Rprofile' COPY . . + +RUN R -q -e 'pak::local_install_deps()' # remove secrets from COPY -RUN rm /.Renviron /.envrc +RUN touch /.Renviron /.envrc && rm /.Renviron /.envrc RUN R CMD INSTALL . && rm -rf r-pkg-binaries CMD ["/bin/bash"] \ No newline at end of file diff --git a/docker/Dockerfile-ubuntu-2404 b/docker/Dockerfile-ubuntu-2404 index 27c0b2e..1d433db 100644 --- a/docker/Dockerfile-ubuntu-2404 +++ b/docker/Dockerfile-ubuntu-2404 @@ -15,7 +15,7 @@ ENV PGPASS="" ARG GITHUB_PAT # xvfb: for graphical pkgs requiring tcl, like gWidgets2tcltk -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 +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 ### CUSTOM DEPENDENCIES # These usually are not packaged in OS repositories and need to be installed from source @@ -23,24 +23,21 @@ RUN apt update && apt install -y --no-install-recommends gdebi-core g++ gfortran 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 >/dev/null && rm -rf JAGS-4.3.2.tar.gz JAGS-4.3.2 && cd .. ### INSTALL R -RUN curl -O https://devxy-r-builds.s3.eu-central-2.amazonaws.com/2404/r-${R_VERSION}_1_arm64.deb -RUN gdebi -n -qq r-${R_VERSION}_1_arm64.deb && rm r-${R_VERSION}_1_arm64.deb +RUN curl -O "https://devxy-r-builds.s3.eu-central-2.amazonaws.com/2404/r-${R_VERSION}_1_arm64.deb" +RUN gdebi -n -qq "r-${R_VERSION}_1_arm64.deb" && rm "r-${R_VERSION}_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))' # Makevars RUN mkdir -p /root/.R && bash -c 'echo -e "CXX_STD = CXX14\nCC=ccache gcc\nCPP=ccache gcc\nCXX=ccache g++\nCXX11=ccache g++\nCXX14=ccache g++\nCXX17=ccache g++\nF77=ccache /usr/bin/gfortran\nFC=ccache /usr/bin/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" > /root/.Renviron' - -# 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", "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", "RSQLite", "cachem", "crayon", "debugme", "fastmap", "memoise", "pat-s/cranlike@s3", "pat-s/desc@description-from-remote"))' +RUN bash -c 'echo -e "options(pkg.sysreqs_verbose = TRUE, 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\")))" > ~/.Rprofile' COPY . . + +RUN R -q -e 'pak::local_install_deps()' # remove secrets from COPY -RUN rm /.Renviron /.envrc +RUN touch /.Renviron /.envrc && rm /.Renviron /.envrc RUN R CMD INSTALL . && rm -rf r-pkg-binaries CMD ["/bin/bash"] \ No newline at end of file