Skip to content

Commit

Permalink
fix pkg list
Browse files Browse the repository at this point in the history
  • Loading branch information
jfouret committed Jun 9, 2024
1 parent c85ca34 commit 6247ee5
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 35 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.description="Nexoverse is a list of packages used
LABEL org.opencontainers.image.vendor="Nexomis"
LABEL org.opencontainers.image.licenses="Apache-2.0"

COPY install_cran.r install_bioc.r nexoverse.cran.txt nexoverse.bioc.txt /root/
COPY install.r nexoverse.cran.txt nexoverse.bioc.txt /root/

RUN Rscript /root/install_cran.r /root/nexoverse.cran.txt \
&& Rscript /root/install_bioc.r /root/nexoverse.bioc.txt
RUN Rscript /root/install.r cran /root/nexoverse.cran.txt \
&& Rscript /root/install.r bioc /root/nexoverse.bioc.txt
11 changes: 8 additions & 3 deletions install_cran.r → install.r
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,26 @@ if (length(args) == 0) {
stop("No arguments provided. Please specify a file name.")
}

input_file <- args[1]
source_type <- args[1]
input_file <- args[2]

listpackages = read.table(input_file, header = F)$V1

rspm::enable()

for (pkg_name in listpackages){
if (pkg_name != "" & length(find.package(pkg_name, quiet = T)) == 0) {
if ( (!startsWith(pkg_name, "#")) & pkg_name != "" & length(find.package(pkg_name, quiet = T)) == 0) {
print("")
print("######################################################")
print("####### START PACKAGE INSTALL #######")
print(pkg_name)
print("######################################################")
print("")
install.packages(pkg_name, clean = TRUE)
if (source_type == "cran"){
install.packages(pkg_name, clean = TRUE)
} else if (source_type == "bioc") {
BiocManager::install(pkg_name, clean = TRUE, ask = FALSE, update = FALSE)
}
}
}

Expand Down
26 changes: 0 additions & 26 deletions install_bioc.r

This file was deleted.

7 changes: 4 additions & 3 deletions nexoverse.cran.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# commented for package with a bug during install resulting in large size images
assertthat
BiocManager
circlize
cli
collapse
copula
#copula
cowplot
data.table
dendextend
Expand All @@ -17,7 +18,7 @@ factoextra
fastmatch
furrr
future
GenOrd
#GenOrd
ggdendro
GGally
ggfortify
Expand All @@ -33,7 +34,7 @@ jinjar
jpeg
jquerylib
knitr
LaplacesDemon
#LaplacesDemon
logging
magrittr
matrixStats
Expand Down

0 comments on commit 6247ee5

Please sign in to comment.