From 41c052a21a2c647a6bf50fc3f7ce6833b62a8995 Mon Sep 17 00:00:00 2001 From: Roman Eisner Date: Tue, 30 May 2023 10:07:55 -0600 Subject: [PATCH] Switching to rstudio package manager --- Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index afc9f0f..219f744 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,8 +9,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && apt-get -y update \ xdg-utils \ && rm -rf /var/lib/apt/lists/* + # Freezing packages: -RUN echo "options(repos = c(REPO_NAME = 'https://mran.microsoft.com/snapshot/2022-04-22'))" >> $R_HOME/etc/Rprofile.site +ARG TARGETPLATFORM +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") \ + echo "options(repos = c(REPO_NAME = 'https://packagemanager.rstudio.com/cran/__linux__/jammy/2022-04-22'))" >> $R_HOME/etc/Rprofile.site ;; \ + "linux/arm64") \ + echo "options(repos = c(REPO_NAME = 'https://packagemanager.rstudio.com/cran/2022-04-22'))" >> $R_HOME/etc/Rprofile.site ;; \ +esac RUN R -e "options(warn = 2); install.packages(c('assertthat', \ 'data.table', \