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

Extend template for renv packaging #55

Open
zuphilip opened this issue Oct 20, 2024 · 1 comment
Open

Extend template for renv packaging #55

zuphilip opened this issue Oct 20, 2024 · 1 comment

Comments

@zuphilip
Copy link

A more reproducible approach w.r.t. to packaging is using renv instead of the install.R file. Thus I wonder whether the template could be extended to handle renv packaging as well?

Essentially one could add the following line to the template:

RUN if [ -f renv.lock ]; then R -e "renv::restore()"; fi

However, maybe some further changes might be needed, e.g. not having the files directly in the home directory of the NB_USER but rather in a subdirectory of it. At least that was what I came up after some try-and-error work.

@cboettig
Copy link
Member

yes, should be fine in most cases. renv already has detailed docs on a few different ways to do Docker builds with renv, https://rstudio.github.io/renv/articles/docker.html .

This binder recipe is specific to compatibility for mybinder.org (with i.e. python/jupyter + Rstudio), but could probably use a refresh. For instance, in all these cases the user is still responsible for either choosing a base image that has the necessary system libraries or editing apt.txt explicitly. @eddelbuettel et al's work with BSPM is a much simpler, more elegant solution for this in most cases, (though without as strong version promise, though docker image tags provide an alternative mechanism for that.)

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

No branches or pull requests

2 participants