gdrplatform / gDRcore

R package to process dose-response curve data with the GR methods
https://gdrplatform.github.io/gDRcore
1 stars 1 forks source link

Dependency installation failing in install_all_deps.R using MRAN snapshot #24

Closed ChristopherEeles closed 1 year ago

ChristopherEeles commented 1 year ago

Seems like the MRAN snapshot is bad. I got the image to build with:

repos <- c(
  CRAN = "https://cran.rstudio.com"
)

For some reason it can't find any of the Bioconductor packages. Maybe the referenced Bioconductor build got archived or the URL changed?

Reprex

Pull most recent main from gDR repo.

From gdrplatform/gDR/

bash extras/create_image.sh

Error:

[+] Building 47.5s (10/14)                                                                                
 => [internal] load build definition from Dockerfile                                                 0.0s
 => => transferring dockerfile: 38B                                                                  0.0s
 => [internal] load .dockerignore                                                                    0.0s
 => => transferring context: 2B                                                                      0.0s
 => [internal] load metadata for docker.io/arkadiuszgladki/gdr_shiny:0.08                            1.0s
 => [auth] arkadiuszgladki/gdr_shiny:pull token for registry-1.docker.io                             0.0s
 => [1/9] FROM docker.io/arkadiuszgladki/gdr_shiny:0.08@sha256:0e4df81f468e4991bb8b68a57bb0f6d55554  0.0s
 => [internal] load build context                                                                    0.0s
 => => transferring context: 11.82kB                                                                 0.0s
 => CACHED [2/9] RUN mkdir -p /mnt/vol                                                               0.0s
 => CACHED [3/9] COPY rplatform/dependencies.yaml rplatform/.github_access_token.txt* /mnt/vol       0.0s
 => [4/9] COPY rplatform/install_all_deps.R /mnt/vol/install_all_deps.R                              0.1s
 => ERROR [5/9] RUN R -f /mnt/vol/install_all_deps.R                                                46.4s
------                                                                                                    
 > [5/9] RUN R -f /mnt/vol/install_all_deps.R:                                                            
#10 0.380                                                                                                 
#10 0.380 R version 4.1.0 (2021-05-18) -- "Camp Pontanezen"                                               
#10 0.380 Copyright (C) 2021 The R Foundation for Statistical Computing                                   
#10 0.380 Platform: x86_64-pc-linux-gnu (64-bit)                                                          
#10 0.380 
#10 0.380 R is free software and comes with ABSOLUTELY NO WARRANTY.
#10 0.380 You are welcome to redistribute it under certain conditions.
#10 0.380 Type 'license()' or 'licence()' for distribution details.
#10 0.380 
#10 0.380 R is a collaborative project with many contributors.
#10 0.380 Type 'contributors()' for more information and
#10 0.380 'citation()' on how to cite R or R packages in publications.
#10 0.380 
#10 0.380 Type 'demo()' for some demos, 'help()' for on-line help, or
#10 0.380 'help.start()' for an HTML browser interface to help.
#10 0.380 Type 'q()' to quit R.
#10 0.380 
#10 0.439 > # Settings
#10 0.439 > repos <- c(
#10 0.439 + CRAN = "https://cran.microsoft.com/snapshot/2021-08-25"
#10 0.439 + )
#10 0.439 > options(repos = repos)
#10 0.439 > essential_pkgs <- list(
#10 0.439 +   list(name = "git2r"),
#10 0.439 +   list(name = "yaml"),
#10 0.439 +   list(name = "BiocManager"),
#10 0.439 +   list(name = "curl")
#10 0.439 + )
#10 0.439 > base_dir <- "/mnt/vol"
#10 0.439 > deps_yaml <- file.path(base_dir, "/dependencies.yaml")
#10 0.439 > use_ssh <- FALSE
#10 0.439 > 
#10 0.439 > # Auxiliary functions
#10 0.439 > verify_version <- function(name, required_version) {
#10 0.439 +   pkg_version <- packageVersion(name)
#10 0.439 +   ## '>=1.2.3' => '>= 1.2.3'
#10 0.439 +   required_version <-
#10 0.439 +     gsub("^([><=]+)([0-9.]+)$", "\\1 \\2", required_version, perl = TRUE)
#10 0.439 +   if (!remotes:::version_satisfies_criteria(pkg_version, required_version)) {
#10 0.439 +     stop(sprintf(
#10 0.439 +       "Invalid version of %s. Installed: %s, required %s.",
#10 0.439 +       name,
#10 0.439 +       pkg_version,
#10 0.439 +       required_version
#10 0.439 +     ))
#10 0.439 +   }
#10 0.439 + }
#10 0.439 > #' this function help figuring out which GitHub domain should be used 
#10 0.439 > #' github.roche.com will be chosen if available 
#10 0.439 > #' otherwise github.com
#10 0.439 > get_github_hostname <- function() {
#10 0.439 +   conn_status <- tryCatch(
#10 0.439 +     curl::curl_fetch_memory("github.roche.com"),
#10 0.439 +     error = function(e) {
#10 0.439 +       e
#10 0.439 +     }
#10 0.439 +   )
#10 0.440 +   # error in connection to database will be returned as error list with exit_code = 2
#10 0.440 +   if (inherits(conn_status, "error")) {
#10 0.440 +     "api.github.com"
#10 0.440 +   } else {
#10 0.440 +     "github.roche.com/api/v3"
#10 0.440 +   }
#10 0.440 + }
#10 0.440 > 
#10 0.440 > # Install {remotes}
#10 0.440 > if (!"remotes" %in% installed.packages()) {
#10 0.440 +   install.packages(pkgs = "remotes")
#10 0.440 + }
#10 0.500 > 
#10 0.500 > 
#10 0.500 > # Install essential tools
#10 0.500 > for (pkg in essential_pkgs) {
#10 0.500 +   if (!pkg$name %in% installed.packages()) {
#10 0.500 +     remotes::install_version(
#10 0.500 +       package = pkg$name,
#10 0.500 +       version = pkg$version
#10 0.500 +     )
#10 0.500 +   }
#10 0.500 + }
#10 0.526 > 
#10 0.526 > # determine GitHub domain
#10 0.526 > gh_hostname <- get_github_hostname()
#10 0.735 > 
#10 0.735 > # Use GitHub access_token if available
#10 0.735 > gh_access_token_file <- file.path(base_dir, ".github_access_token.txt")
#10 0.735 > if (file.exists(gh_access_token_file)) {
#10 0.735 +   ac <- readLines(gh_access_token_file, n = 1L)
#10 0.735 +   stopifnot(length(ac) > 0)
#10 0.735 +   Sys.setenv(GITHUB_TOKEN = ac)
#10 0.735 + }
#10 0.735 > 
#10 0.735 > # Use SSH keys
#10 0.735 > keys <- if (isTRUE(use_ssh)) {
#10 0.735 +   git2r::cred_ssh_key(
#10 0.735 +     publickey = ssh_key_pub,
#10 0.735 +     privatekey = ssh_key_priv
#10 0.735 +   )
#10 0.735 + }
#10 0.735 > 
#10 0.735 > 
#10 0.735 > # Install all dependencies
#10 0.735 > deps <- yaml::read_yaml(deps_yaml)$pkgs
#10 0.738 > for (name in names(deps)) {
#10 0.738 +   pkg <- deps[[name]]
#10 0.738 +   if (is.null(pkg$source)) { pkg$source <- "Git" }
#10 0.738 +   switch(toupper(pkg$source),
#10 0.738 + 
#10 0.738 +     ## CRAN installation
#10 0.738 +     "CRAN" = {
#10 0.738 +       if (is.null(pkg$repos)) { pkg$repos <- repos }
#10 0.738 +       remotes::install_version(
#10 0.738 +         package = name,
#10 0.738 +         version = pkg$ver,
#10 0.738 +         repos = pkg$repos
#10 0.738 +       )
#10 0.738 +     },
#10 0.738 + 
#10 0.738 +     ## Bioconductor installation
#10 0.738 +     "BIOC" = {
#10 0.738 +       if (is.null(pkg$ver)) { pkg$ver <- BiocManager::version() }
#10 0.738 +       BiocManager::install(
#10 0.738 +         pkgs = name,
#10 0.738 +         update = FALSE,
#10 0.738 +         version = pkg$ver  ## Bioc version or 'devel'
#10 0.738 +       )
#10 0.738 +     },
#10 0.738 +     
#10 0.738 +     ## GitHub installation
#10 0.738 +     "GITHUB" = {
#10 0.739 +       if (is.null(pkg$ref)) { pkg$ref <- "HEAD" }
#10 0.739 +       remotes::install_github(
#10 0.739 +         repo = pkg$url,
#10 0.739 +         ref = pkg$ref,
#10 0.739 +         subdir = pkg$subdir,
#10 0.739 +         host = gh_hostname
#10 0.739 +       )
#10 0.739 +       verify_version(name, pkg$ver)
#10 0.739 +     },
#10 0.739 +     
#10 0.739 +     ## Git installation
#10 0.739 +     "GIT" = {
#10 0.739 +       remotes::install_git(
#10 0.739 +         url = pkg$url,
#10 0.739 +         subdir = pkg$subdir,
#10 0.739 +         ref = pkg$ref,
#10 0.739 +         credentials = keys
#10 0.739 +       )
#10 0.739 +       verify_version(name, pkg$ver)
#10 0.739 +     }
#10 0.740 +   )
#10 0.740 + }
#10 0.755 Using github PAT from envvar GITHUB_TOKEN
#10 1.176 Downloading GitHub repo gdrplatform/gDRutils@master
#10 3.782 jsonvalidate (NA -> 1.1.0) [CRAN]
#10 3.782 Skipping 4 packages not available: SummarizedExperiment, S4Vectors, MultiAssayExperiment, BumpyMatrix
#10 3.783 Skipping 2 packages ahead of CRAN: stringi, tibble
#10 3.784 Installing 1 packages: jsonvalidate
#10 3.785 Installing package into ‘/usr/local/lib/R/site-library’
#10 3.785 (as ‘lib’ is unspecified)
#10 4.185 trying URL 'https://cran.microsoft.com/snapshot/2021-08-25/src/contrib/jsonvalidate_1.1.0.tar.gz'
#10 4.733 Content type 'application/octet-stream' length 78462 bytes (76 KB)
#10 4.801 ==================================================
#10 4.881 downloaded 76 KB
#10 4.881 
#10 5.134 * installing *source* package ‘jsonvalidate’ ...
#10 5.135 ** package ‘jsonvalidate’ successfully unpacked and MD5 sums checked
#10 5.135 ** using staged installation
#10 5.142 ** R
#10 5.144 ** inst
#10 5.145 ** byte-compile and prepare package for lazy loading
#10 5.395 ** help
#10 5.403 *** installing help indices
#10 5.412 ** building package indices
#10 5.571 ** installing vignettes
#10 5.573 ** testing if installed package can be loaded from temporary location
#10 6.101 ** testing if installed package can be loaded from final location
#10 6.592 ** testing if installed package keeps a record of temporary installation path
#10 6.593 * DONE (jsonvalidate)
#10 6.599 
#10 6.599 The downloaded source packages are in
#10 6.599       ‘/tmp/RtmpvZHqmK/downloaded_packages’
#10 6.599 Running `R CMD build`...
#10 6.841 * checking for file ‘/tmp/RtmpvZHqmK/remotes711e0e8b1/gdrplatform-gDRutils-ec949652315729744f573ab4dc2157eebb8bd514/gDRutils/DESCRIPTION’ ... OK
#10 6.841 * preparing ‘gDRutils’:
#10 6.841 * checking DESCRIPTION meta-information ... OK
#10 6.841 * checking for LF line-endings in source and make files and shell scripts
#10 6.841 * checking for empty or unneeded directories
#10 6.841 * building ‘gDRutils_1.3.5.tar.gz’
#10 6.842 Installing package into ‘/usr/local/lib/R/site-library’
#10 6.842 (as ‘lib’ is unspecified)
#10 7.043 * installing *source* package ‘gDRutils’ ...
#10 7.043 ** using staged installation
#10 7.054 ** R
#10 7.064 ** inst
#10 7.065 ** byte-compile and prepare package for lazy loading
#10 11.80 ** help
#10 11.88 *** installing help indices
#10 11.93 ** building package indices
#10 12.13 ** testing if installed package can be loaded from temporary location
#10 15.41 ** testing if installed package can be loaded from final location
#10 18.69 ** testing if installed package keeps a record of temporary installation path
#10 18.70 * DONE (gDRutils)
#10 18.71 Using github PAT from envvar GITHUB_TOKEN
#10 18.92 Downloading GitHub repo gdrplatform/gDRstyle@main
#10 20.02 
#10 20.02 Skipping 2 packages ahead of CRAN: stringi, tibble
#10 20.02 Running `R CMD build`...
#10 20.19 * checking for file ‘/tmp/RtmpvZHqmK/remotes75662bcef/gdrplatform-gDRstyle-e0c6aededa173deea1671112c4d304c448db33e1/DESCRIPTION’ ... OK
#10 20.19 * preparing ‘gDRstyle’:
#10 20.19 * checking DESCRIPTION meta-information ... OK
#10 20.19 * checking for LF line-endings in source and make files and shell scripts
#10 20.19 * checking for empty or unneeded directories
#10 20.19 Removed empty directory ‘gDRstyle/inst/scripts’
#10 20.19 * building ‘gDRstyle_1.3.1.tar.gz’
#10 20.19 Installing package into ‘/usr/local/lib/R/site-library’
#10 20.19 (as ‘lib’ is unspecified)
#10 20.35 * installing *source* package ‘gDRstyle’ ...
#10 20.35 ** using staged installation
#10 20.36 ** R
#10 20.36 ** inst
#10 20.36 ** byte-compile and prepare package for lazy loading
#10 20.61 ** help
#10 20.62 *** installing help indices
#10 20.63 ** building package indices
#10 20.78 ** testing if installed package can be loaded from temporary location
#10 20.97 ** testing if installed package can be loaded from final location
#10 21.16 ** testing if installed package keeps a record of temporary installation path
#10 21.16 * DONE (gDRstyle)
#10 21.17 Using github PAT from envvar GITHUB_TOKEN
#10 21.38 Downloading GitHub repo gdrplatform/gDRtestData@master
#10 27.41 
#10 27.41 Running `R CMD build`...
#10 38.45 * checking for file ‘/tmp/RtmpvZHqmK/remotes75b56294f/gdrplatform-gDRtestData-adb3820630e94ed5cb24cb0015d7c9e0709c5b02/gDRtestData/DESCRIPTION’ ... OK
#10 38.45 * preparing ‘gDRtestData’:
#10 38.45 * checking DESCRIPTION meta-information ... OK
#10 38.45 * checking for LF line-endings in source and make files and shell scripts
#10 38.45 * checking for empty or unneeded directories
#10 38.45 Omitted ‘LazyData’ from DESCRIPTION
#10 38.45   NB: this package now depends on R (>= 3.5.0)
#10 38.45   WARNING: Added dependency on R >= 3.5.0 because serialized objects in
#10 38.45   serialize/load version 3 cannot be read in older versions of R.
#10 38.45   File(s) containing such objects:
#10 38.45     ‘gDRtestData/inst/testdata/cell_annotation.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/drug_annotation.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalMAE_combo_1dose_many_drugs.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalMAE_combo_2dose_nonoise.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalMAE_combo_2dose_nonoise2.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalMAE_combo_2dose_nonoise3.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalMAE_combo_codilution_small.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalMAE_combo_codilution.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalMAE_combo_matrix_small.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalMAE_combo_matrix_test.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalMAE_combo_matrix.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalMAE_combo_triple.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalMAE_many_drugs.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalMAE_many_lines.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalMAE_medium.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalMAE_small_no_noise.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalMAE_small.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalMAE_wLigand.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalSE_combo_1dose_many_drugs.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalSE_combo_2dose_nonoise.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalSE_combo_2dose_nonoise2.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalSE_combo_2dose_nonoise3.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalSE_combo_codilution_small.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalSE_combo_codilution.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalSE_combo_matrix_small.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalSE_combo_matrix.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalSE_combo_triple.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalSE_combo_with_metrics.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalSE_invalid_small.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalSE_many_drugs.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalSE_many_lines.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalSE_medium.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalSE_small_no_noise.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalSE_small_wDay0_no_noise.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalSE_small.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalSE_wLigand_wDay0.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/finalSE_wLigand.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/metaprojects.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/P_999.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/projects.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/raw_synthetic_data/combo_2dose_nonoise/finalMAE_combo_2dose_nonoise.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/raw_synthetic_data/combo_matrix_small/finalMAE_combo_matrix_small.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/raw_synthetic_data/small/finalMAE_small.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/raw_synthetic_data/wLigand/finalMAE_wLigand.RDS’
#10 38.45     ‘gDRtestData/inst/testdata/synthetic_list.RDS’
#10 38.45 * building ‘gDRtestData_1.3.1.tar.gz’
#10 38.45 Installing package into ‘/usr/local/lib/R/site-library’
#10 38.45 (as ‘lib’ is unspecified)
#10 41.75 * installing *source* package ‘gDRtestData’ ...
#10 41.75 ** using staged installation
#10 41.76 ** R
#10 41.76 ** inst
#10 41.92 ** byte-compile and prepare package for lazy loading
#10 42.31 ** help
#10 42.33 *** installing help indices
#10 42.34 ** building package indices
#10 42.51 ** testing if installed package can be loaded from temporary location
#10 42.66 ** testing if installed package can be loaded from final location
#10 42.81 ** testing if installed package keeps a record of temporary installation path
#10 42.81 * DONE (gDRtestData)
#10 42.85 Using github PAT from envvar GITHUB_TOKEN
#10 43.11 Downloading GitHub repo gdrplatform/gDRcore@master
#10 44.79 
#10 44.79 Skipping 4 packages not available: SummarizedExperiment, S4Vectors, MultiAssayExperiment, BiocParallel
#10 44.79 Skipping 2 packages ahead of CRAN: stringi, tibble
#10 44.79 Running `R CMD build`...
#10 45.01 * checking for file ‘/tmp/RtmpvZHqmK/remotes76b068f99/gdrplatform-gDRcore-ce58575a2d36fbcd6ee01931a890ec8e32c6d6e1/gDRcore/DESCRIPTION’ ... OK
#10 45.01 * preparing ‘gDRcore’:
#10 45.01 * checking DESCRIPTION meta-information ... OK
#10 45.01 * cleaning src
#10 45.01 * checking for LF line-endings in source and make files and shell scripts
#10 45.01 * checking for empty or unneeded directories
#10 45.01 * building ‘gDRcore_1.3.4.tar.gz’
#10 45.01 Installing package into ‘/usr/local/lib/R/site-library’
#10 45.01 (as ‘lib’ is unspecified)
#10 45.18 ERROR: dependency ‘BiocParallel’ is not available for package ‘gDRcore’
#10 45.18 * removing ‘/usr/local/lib/R/site-library/gDRcore’
#10 45.19 Error in packageVersion(name) : there is no package called ‘gDRcore’
#10 45.19 Calls: verify_version -> packageVersion
#10 45.19 In addition: Warning message:
#10 45.19 In i.p(...) :
#10 45.19   installation of package ‘/tmp/RtmpvZHqmK/file777b73267/gDRcore_1.3.4.tar.gz’ had non-zero exit status
#10 45.19 Execution halted
------
executor failed running [/bin/sh -c R -f /mnt/vol/install_all_deps.R]: exit code: 1
gladkia commented 1 year ago

Hi @ChristopherEeles,

Thanks!

ChristopherEeles commented 1 year ago

Hi @gladkia,

Yes everything is working now. Thanks for the prompt reply.

Best, Chris