Skip to content

Commit

Permalink
better strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
cboettig committed Dec 30, 2024
1 parent 4727bec commit 4673dfd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
3 changes: 2 additions & 1 deletion images/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}

4 changes: 4 additions & 0 deletions images/Dockerfile.gpu
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 0 additions & 11 deletions images/install.r
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 4673dfd

Please sign in to comment.