-
Notifications
You must be signed in to change notification settings - Fork 3
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
Question: how to use rstudio with r2u? #1
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
Docker works in layers. If you start from So you have to turn the layers upside down: I would start from Let us know how that goes. I will close this as there is no deficiency in r2u itself we need to address. You simply have a desire for a different use case that can be addressed. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
As I recall, at the very r2u beginning it even failed in a running rstudio but IIRC there was a simple, basic change Inaki made so it works from inside RStudio too. We used it with great success in the server backing my class too. But fundamentally there are limits: r2u uses and adjust the main mechanics R uses: |
Thanks @eddelbuettel and @eitsupi for your fast answer! I see about not mixing r2u and Anyway, here is what I did to the Dockerfile:
Having started the docker, I then need to do:
I get then the message:
Where would you advise to do set Thanks! |
Maybe look at the existing Dockerfile(s) for inspiration? Line 76 in 72feb02
Maybe there are interactions with rstudio on uid=1000 vs root. I haven't tried this myself. |
Thanks Dirk! I forgot that Anyway, this does the trick, I was able to use rstudio and read/link a folder from my host computer into the container. I also realized that I didn't need to create another user as long as one knows/assigns the password of user Thanks for your help on that! |
If you can / want to document this for another user it may be helpful for someone looking for this. Also, your sentence about
is unclear to me. On this machine that I am typing I have both RStudio Desktop and RStudio server and when I query Every R sessions read |
Actually, I wasn't correct stating this: the
So I am not so sure how one would handle that? |
Right. Can you carry it over to the |
And happy to share my Dockerfile, although I feel it is really basic and probably makes several mistakes, and the
Here are the lines added on top of the Dockerfile in this repo:
|
Hm, so maybe the answer is to ... not do Mostly because I am root in my containers. I still have that also in my default CI setup (via r-ci so I still have something to learn here too. So thanks for asking over there. |
Inaki quickly helped me realize that I just had to put Thanks! Adding below the corrected Dockerfile, steps to run it are:
Dockerfile:
|
Hi, I am following up on a post I did a few days ago. I had the same aim to add RStudio to r2u. Premise: for the moment, I found a simple solution to my needs (namely, getting the container ready with the libraries required for most R packages). However, I gave it a shot nonetheless.
This indeed works and gets me an RStudio instance running. However, I cannot install any package, as I get an error referring to policikit or a cryptic |
Note that the install script of this rstudio-server Dev Container Feature should be able to install RStudio Server on rocker/r2u (although I have hardly tried it) |
Thanks for following up in the existing issue! That's how it should be. First feedback: Why do you not use |
And @eitsupi is fully correct: We probably want to take advantage of the existing infrastructure, and lessons learned (!!) about which ports to open where, adjust the s6 process if needed etc. So please try you added command on the simpler r2u container and then if possible show us a) the command(s) you run and b) the errors you saw. It if quite likely that one or both of us have seen the same errors before and can help. |
Thank you, and I am sorry for my ingenuity. Indeed, what you suggested seems to work; my Dockerfile now is:
Next, I opened the folder in VSCode, manually created the .devcontainer folder, and added this
Do you think this makes sense? I have never used this before, and from my understanding, this is a VScode feature, right? After that, I open the folder as a container, and RStudio is executed. I can listen to 8787 and install packages successfully. However, it is taking minutes to install |
I would suggest we disentangle this. You started this conversation about adding What happens in a |
Hi Dirk
I would like to use rstudio with the r2u docker and was wondering if you could share some advice on how to do this (sorry, I just stared exploring the docker functionalities). Basically, it seems like I am interested in combining
rocker/rstudio
withrocker/r2u:focal
.How would you advise to go? Should I go for one image and seek to install the other component interactively, or rather seek to merge both functionalities in a custom image (though calling
RUN /rocker_scripts/install_rstudio.sh
seems difficult for a beginner)?Thanks!
The text was updated successfully, but these errors were encountered: