diff --git a/images/Dockerfile b/images/Dockerfile index 9c37c79..ce8bdeb 100644 --- a/images/Dockerfile +++ b/images/Dockerfile @@ -41,7 +41,8 @@ ENV PATH=$PATH:/usr/lib/rstudio-server/bin/quarto/bin COPY install.r install.r RUN Rscript install.r - +## switch from BSPM to r-universe for user default +COPY Rprofile /etc/R/Rprofile.site USER ${NB_USER} diff --git a/images/Dockerfile.gpu b/images/Dockerfile.gpu index cf1e68b..25e08c9 100644 --- a/images/Dockerfile.gpu +++ b/images/Dockerfile.gpu @@ -44,6 +44,10 @@ ENV PATH=$PATH:/usr/lib/rstudio-server/bin/quarto/bin COPY install.r install.r RUN Rscript install.r +## switch from BSPM to r-universe for user default +COPY Rprofile /etc/R/Rprofile.site + + USER ${NB_USER} COPY spatial-env.yml spatial-env.yml diff --git a/images/install.r b/images/install.r index bd47791..b8c5bbf 100644 --- a/images/install.r +++ b/images/install.r @@ -1,13 +1,2 @@ install.packages(c('tidyverse', 'devtools', 'reticulate', 'nimble', 'duckdbfs', 'arrow', 'gdalcubes', 'rstac', 'terra', 'sf', 'stars', 'quarto', 'mapgl', 'neonstore', 'rfishbase', 'shiny', 'pak')) -# NOTE: r-universe supports binaries only for latest R release and latest LTS, as follows: -readr::write_lines(" -options(repos = c( - linux = 'https://cran.r-universe.dev/bin/linux/noble/4.4/', - sources = 'https://cran.r-universe.dev' -)) -", -paste0(R.home(), "/etc/Rprofile.site"), -append = TRUE) -# NOTE: also, we omit an official cran repo to avoid more recent source version taking priority over install from binary. -