-
Notifications
You must be signed in to change notification settings - Fork 155
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
Docker with renv using rocker/rstudio #446
Comments
I suspect this is just due to how RStudio Server is launched within Docker containers. I'm not aware of a better fix than just setting
What do you see when you try to call |
or even if i try kicking off R to run I believe it has to do with the Currently, my workaround is to run this: docker run -d --rm -it
-e ROOT=TRUE
-e DISABLE_AUTH=TRUE
-e RENV_PATHS_CACHE=/renv/cache
-p 8787:8787
-v C:\Users\other\docker\renv\cache:/renv/cache
-v C:\Users\other\docker\myproject:/home/rstudio/myproject
renv:latest As you can see I've added an extra volume, and at the location locally, i have an Rscript containing this: Sys.setenv(RENV_PATHS_CACHE = '/renv/cache')
setwd("~/myproject")
renv::restore(prompt = FALSE) once I'm in Rstudio, i just run this and I'm good. A bit manual, but it works in the meantime i guess. |
Having the same problem. It's related to this issue rocker-org/rocker#376. I solved it by also setting |
I made a script to generate a |
I guess it would be nice to set |
Tracking docker recommendation improvements in #599 |
Hi, I was following the best practices for docker with renv from here. I am not sure what I'm doing wrong but it does not seem that I am able to use the rocker/rstudio image in order to use this best practice for running containers. Here is some supporting information:
Some issues I tried to work through with no luck
printenv
and view the env var, but usingSys.getenv()
in Rstudio console the variable does not get picked up. Additionally, if I use the Terminal within Rstudio and runprintenv
I am unable to see the variable as rstudio user or as root.Sys.setenv(RENV_PATHS_CACHE = /renv/cache)
has worked, but again, its manualrenv::restore()
as a post-command for the run command aboveENTRYPOINT ['R']
as the last command to Dockerfile, but then I have to manually run/init
which kickstarts RstudioThanks for your help.
The text was updated successfully, but these errors were encountered: