Comments (20)
@yuvipanda any ideas?
from binder.
I can switch to an existing *.Rproj
file in https://mybinder.org/v2/gh/krlmlr/minver/master?urlpath=rstudio, the image is based on R 3.6.0.
from binder.
Same error if trying to open an existing .Rproj file.
from binder.
@ryanlovett I can confirm this behavior as well. I suspect it has something to do with the proxy. Can you replicate this on your end?
from binder.
Confirmed.
nbrsessionproxy does a very poor job of tracking the state of the rsession process. It can either improve what it has, manage the subprocesses via the environment's init (e.g. systemd), or use a third party library.
I think it will actually be easier to start rsession via the Hub spawner rather than from within Jupyter. This way JupyterHub can keep track of the rsession web service the same way it keeps track of Jupyter. This essentially means that if the Hub wants to support both Jupyter and RStudio, it needs to support more than one server per user. From the user perspective, they'd click "RStudio session" from among Jupyter, RStudio session, and other apps listed in a spawner screen rather than from a Jupyter notebook.
In the interim, I can try to improve the subprocess management, e.g. at least invalidate the state whenever the server can't be reached. I've no idea why the git integration is causing rsession to crash on mybinder. It seems to have checked out the repo I specified.
from binder.
Having "start Jupyter server" or "start Rstudio Server" buttons would be an interesting option at the beginning, but actually I consider it a plus to have the jupyter file manager, terminal, etc., as well as other notebooks, available for a poly-lingual workspace.
For some reason the git integrations are not available in Rstudio unless a project has been started, which is a poor design decision from Rstudio imho, but I think it is starting a project, rather than git, that is the problem. It's not the end of the world since a user can use the terminal, but anyone tempted to open a project will hit the wall.
from binder.
I see the same issue on a Hub so it isn't related to Binder.
from binder.
@brooksambrose On the RStudio side of things, this is normally all taken care of by RStudio's server, rserver
, which perfectly happy to handle the multiple sessions. I believe the problem we have created here is in part because we have bypassed rserver
, and just allowed Jupyter to run the user-level process rsession
alone.
As far as multi-lingual environments with file manager, terminal etc available, I'll just note in passing that you can of course run Python or other languages in R notebook chunks (much as you can in jupyter), as you no doubt already know, so I don't see the Jupyter Hub file-manager and terminal as being available as adding anything new in that regard.
IMHO, the current feels a little bit like a hack still, partly constrained by compatibility with the existing binder ecosystem, which is already very jupyter focused. A more polished interface I think would present the user with a nice webpage where they could simply choose between a jupyter-notebook interface or the rstudio interface. One of the guys at the Davis hackathon/workshop was from the Whole Tale project, http://wholetale.org/, and it sounds like they are doing something like that (with addition of connection to xsede data/compute resources). Not trying to knock anything here, just saying it was nice to see that big picture of what a more ideal interface would look like.
Regarding RStudio and git, RStudio uses the notion of 'project' in the first place to define the root directory of a 'project'. Without this, how would the RStudio git GUI know which repository you are working in? (Note that the RStudio git GUI doesn't care what your current working directory is, it only cares about what 'project' you are in).
from binder.
@ryanlovett can you give me a bit more details on what the problem is? does rsession just get killed and not respawned?
from binder.
I think rsession tries to restart itself so that it gets a new "project context".
from binder.
from binder.
jupyterhub/jupyter-rsession-proxy#19 should fix it :)
Feel free to report other issues like this that don't work in github.com/jupyterhub/nbrsessionproxy. Am committed to making this as first class an experience as possible.
from binder.
@yuvipanda wow, nice work!
from binder.
@cboettig sent a PR :)
I believe one more missing feature is Shiny app support, which I'll try to work on this week / next week. We'll also at some point change the UI on binder to allow you to specify 'application to run', which would let you explicitly pick rstudio from a box (rather than type 'rstudio' into 'url to run').
What other features are missing still? https://mybinder.org/v2/gh/yuvipanda/binder-1/upgrade2?urlpath=rstudio should give you a demo of how this works now (until #13 is merged).
Excited to get us up to par :) As I think I said earlier, first class R Studio support is very important to have binder meet its goal of being usable by non-python folks. Since I'm not an R Studio user it is up to y'all to tell us what 'first class' support means, so I highly appreciate bug reports like this one!
from binder.
@cboettig were the binder image rebuilt after #13? I'm still seeing the old behavior if I use a Dockerfile that just says FROM rocker/binder:3.4.2
, e.g. https://mybinder.org/v2/gh/w201rdada/portfolio-brooksambrose/master?filepath=%2Frstudio. Rstudio projects are crashing the same way.
from binder.
@brooksambrose this repo is configured to rebuild automatically on hub after a commit. You can see the last build date for the image on hub https://hub.docker.com/r/rocker/binder/builds/ (or more details via docker inspect
on your image.
from binder.
Yeah thanks, seems to be working now:
https://mybinder.org/v2/gh/rocker-org/binder/master?urlpath=rstudio
from binder.
I'm really enjoying the ease of having RStudio in my browser thanks to Binder!
But I'm seeing the same [Errno 111] Connection refused
problem when either switching to an existing Rproj in the repository, or starting a new one in binder. I'm getting this problem with both of these:
- https://mybinder.org/v2/gh/mrpargeter/phillips_et_al_preservation/master
- http://mybinder.org/v2/gh/benmarwick/modelextinctionideas/master
This is the Dockerfile I'm using for both:
FROM rocker/binder:3.4.2
# Copy repo into ${HOME}, make user own $HOME
USER root
COPY . ${HOME}
RUN chown -R ${NB_USER} ${HOME}
USER ${NB_USER}
## run any install.R script we find
RUN if [ -f install.R ]; then R --quiet -f install.R; fi
In addition, when I click the binder button in the README for rocker-org/binder
, and try to make a new RStudio project in http://beta.mybinder.org/v2/gh/binder-examples/dockerfile-rstudio/master, I also have the same problem.
Only with this one mentioned by @brooksambrose above, https://mybinder.org/v2/gh/rocker-org/binder/master?urlpath=rstudio, can I open an RProj without losing the connection.
In my projects, the RStudio user is 'joyvan' but in the working rocker-org/binder
instance of RStudio, the user is 'rstudio'.
I also notice that my binder URLs are not similar to the ones for the working rocker-org/binder
. For example, the working rocker-org/binder
gives this URL for the RStudio instance: https://hub.mybinder.org/user/rocker-org-binder-sk5wqup6/rstudio/?token=hV31i0_RRlOsCHLGr_OBRA but mine do not include ?token=...
at the end, and instead look like this: https://hub.mybinder.org/user/benmarwick-modelextinctionideas-mmnxjenu/proxy/33597/
If I use @brooksambrose's dockerfile with my repositories then I have no problems switching to RStudio projects:
FROM w201rdada/portfolio:fa17
USER root
COPY . /home/rstudio/
RUN chown -R rstudio:rstudio * .*
USER rstudio
## run any install.R script we find
RUN if [ -f install.R ]; then R --quiet -f install.R; fi
But how can I get my RStudio projects to work using the rocker-org/binder Dockerfile?
from binder.
@benmarwick sorry this fell off my radar. I think this was patched in the newer binder images but not backported to the older versions. I've backported to 3.4.2 now, but I'm not sure how to reset the cache on binder.org so that https://mybinder.org/v2/gh/benmarwick/modelextinctionideas/master rebuilds (though from your end I think any edit to the Dockerfile might due it? Binder folks can clarify for us).
from binder.
Any new update to your 'master' branch should force a rebuild on launch.
from binder.
Related Issues (20)
- shiny support via binder. HOT 4
- What other features are missing still? HOT 12
- More elegant solutions to copying repo to container/image...? HOT 3
- Safari browser cannot open Terminal session in RStudio Server HOT 2
- support servr HOT 1
- Base image: moving rocker/binder higher in the stack? HOT 4
- error with DIY deploy from new binder docs HOT 4
- R 3.4.3 not working HOT 1
- Binder + Jupyter Lab + SSL? HOT 6
- why based on geospatial? HOT 7
- images built on `rocker/binder` can't run RStudio on mybinder.org HOT 14
- 404 not found error with jupyterlab HOT 1
- caret and rsample packages HOT 3
- bug with R 4.0.0 and 4.0.2 containers HOT 10
- Use of rstudio and joyvan home directories HOT 7
- Site not launching? HOT 2
- 500: Internal Server Error HOT 2
- Run locally on docker failing HOT 1
- rstan or cmdstanr packages don't work HOT 3
- Question: Can we get a `rocker/binder:unstable` image?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from binder.