-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.R
More file actions
26 lines (22 loc) · 782 Bytes
/
Copy pathinstall.R
File metadata and controls
26 lines (22 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /usr/local/bin/Rscript
# install R dependencies
# CRAN binaries repo (from image build)
repo <- "https://p3m.dev/cran/__linux__/noble/2025-10-30"
# Guardrail: don't install into /home in the Docker build context
install_lib <- .libPaths()[1]
if (grepl("^/home", install_lib)) {
stop(
"Error: Packages are being installed to /home, which will be removed in the final image. Exiting.",
call. = FALSE
)
}
# Main R ecosystem installed via rocker scripts: https://github.com/rocker-org/rocker-versioned2/scripts
# Tidyverse packages are installed via install_tidyverse.sh
# Geospatial packages are installed via install_geospatial.sh
# Extra packages
list.of.packages <- c(
"reticulate",
"quarto",
"kableExtra"
)
install.packages(list.of.packages, repos = repo)