SwissDataScienceCenter / contributed-project-templates

A repository of community-developed project templates.
Apache License 2.0
4 stars 15 forks source link

Renv template does not build a docker image successfully #64

Open olevski opened 8 months ago

olevski commented 8 months ago
Step 7/15 : RUN bash .renv_install.sh
 ---> Running in 181ef48e0461
Installing renv
renv.lock file detected
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.r-project.org/src/contrib/00Archive/renv/renv_0.15.5.tar.gz'
Error in download.file(p, destfile, method, mode = "wb", ...) : 
  cannot open URL 'https://cran.r-project.org/src/contrib/00Archive/renv/renv_0.15.5.tar.gz'
In addition: Warning message:
In download.file(p, destfile, method, mode = "wb", ...) :
  URL 'https://cran.r-project.org/src/contrib/00Archive/renv/renv_0.15.5.tar.gz': status was 'Couldn't resolve host name'
installed renv v0.15.5
Removing intermediate container 181ef48e0461
 ---> a22dc1e7adfe
Step 8/15 : COPY renv.lock /home/rstudio/renv.lock
 ---> f6a734ffc9b9
Step 9/15 : COPY install.R /tmp/
 ---> [385](https://gitlab.dev.renku.ch/tasko.olevski/test-project-30/-/jobs/365489#L385)2af64fa03
Step 10/15 : RUN R -f /tmp/install.R
 ---> Running in dbc974a7b173
R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
  Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> # The renv library will be located on the docker image, in the /home/rstudio directory,
> # yet it will use the renv.lock file located in the project's main directory to determine which dependencies to install.
> setwd('/home/rstudio')
> options(renv.consent = TRUE)
> write("options(renv.consent = TRUE)", file="/home/rstudio/.Rprofile", append = TRUE)
> renv::init(force = TRUE)
Error in loadNamespace(x) : there is no package called ‘renv’
Calls: loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
The command '/bin/bash -c -o pipefail R -f /tmp/install.R' returned a non-zero code: 1
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code 1
rokroskar commented 7 months ago

@RichardJActon would you be able to have a look at this?