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
Revisiting RSPM and CRAN default repos #658
Comments
Hi, thanks for thinking about this project. I have thought about that of mine too. Of course, users who use Footnotes |
@slager Are you sure this is correctly diagnosed? I use |
I had the same initial read as @eitsupi: And for what it is worth I also check current CRAN (which seems to be your goal) from the non-versioned stack e.g. in the But in the case of Ubuntu LTS releases on x86_64, one can improve over it (as do some related projects for other Linux distros) and |
I'm using a See here: My suggestion for adding |
As a maintainer, I am reluctant to complicate things just to suppress that error. |
This is similar to what is already in the documentation, so if it is the preferred solution, feel free the close the issue. Thank you for the conversation. |
Also if adding a command before running check is too much bother you can always use of the containers that do not need the step. I just picked a random (recent) github repo from another developer I had checked out and ran
which installs 90 or so packages for So in short this works without extra repo settings albeit not with the container you picked. |
Thanks. I benefit from using rocker/ml-verse:latest because of the pre-installed CUDA functionality, which the python part of my R/Python pipeline requires. At some point I'll look into setting up r2u starting with a CUDA base image. |
Definitely the I am closing this issue, but would appreciate your continued contribution by sharing information. Thanks! |
Good point, and acknowledged! I should (time permitting) see about
but especially the second one is non-trivial. A decent (even if short) tutorial write-up might be a start. |
(This is off-topic, but) the script https://github.com/rocker-org/devcontainer-features/blob/c926012d403621a83e9c3ab448188819e098033d/src/r-apt/install.sh should actually work on the CUDA image to set up r2u. |
Ah, yes, and as an Emacs user I should remember that I was also asked by a VS Code user to show |
One additional thing that might be useful would be to feature the r2u images more prominently on https://rocker-project.org |
Related to rocker-org/rocker-versioned2#658 In addition, I replaced RStudio with Posit in several places.
Definitely..... |
Yeah. Been meaning to do that too but I also do not want to jump on @eitsupi's toes as r-ver seems to have its audience. We have a bit of a "branding" issue as the stacks are somewhat non-overlapping so it gets confusing real fast. |
Background
Many Rocker images use this repos setting, which is great for conveniently installing binary packages from RSPM:
However, this will throw an error in
devtools::check()
similar to those reported here:#532
#547
Current workaround
The work-around, as already documented here, is to temporarily switch the repos entry for CRAN:
#532 (comment)
https://rocker-project.org/images/versioned/r-ver#switch-the-default-cran-mirror
Possible improvement
This temporary work-around is not be necessary if
getOption('repos')
is instead set like this:The explanation from a posit employee is here:
https://community.rstudio.com/t/404-error-during-devtools-check/166426/8
Apparently,
install.packages()
tries the first repo, butdevtools::check()
looks specifically for the repo named "CRAN".The rig project apparently uses this dual-repo method:
https://github.com/r-lib/rig/pull/53/files
This tests well for me using
install.packages()
(installs RSPM binaries as desired) anddevtools::check()
(looks up the required file on CRAN as desired).It seems possible from the Posit forum post above that RSPM might add the missing files in the future, which could pre-empt the error, but it seems unknown when or if this will happen.
Raising the issue here in case the Rocker project might want to consider implementing this, which at least on the surface seems very convenient. There may be potential unintended consequences of doing it this way, which I have not tested or thought through very thoroughly, but that the rig project implements it suggests that it could at least be worth considering.
The text was updated successfully, but these errors were encountered: