Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix conda installs #54

Merged
merged 2 commits into from
Oct 27, 2023
Merged

chore: fix conda installs #54

merged 2 commits into from
Oct 27, 2023

Conversation

rokroskar
Copy link
Member

  • removes the defaults channel to avoid conda install timeouts
  • uses mamba instead of conda

@rokroskar rokroskar requested a review from olevski October 5, 2023 15:01
@olevski
Copy link
Member

olevski commented Oct 27, 2023

So the renv template does not build. Not because of this change though - or at least I think not:

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

@olevski
Copy link
Member

olevski commented Oct 27, 2023

I will approve because the error in the renv template is in the bash script that installs r packages with renv not in the stuff we changed.

@rokroskar
Copy link
Member Author

Thanks @olevski - @RichardJActon would you be able to have a look at this error?

@rokroskar rokroskar added this pull request to the merge queue Oct 27, 2023
Merged via the queue into main with commit 46a5d58 Oct 27, 2023
@RichardJActon
Copy link
Contributor

@rokroskar yes - I'll take a look.

The log suggests it's trying to download renv from an incorrect url ...00Archive... not ...Archive...- not sure why that would have changed but I'll see if I can reproduce it and fix the script

@rokroskar
Copy link
Member Author

Thank you!!

@rokroskar rokroskar deleted the 000-fix-conda-installs branch October 27, 2023 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants