Giter Club home page Giter Club logo

Comments (12)

syoh avatar syoh commented on June 21, 2024 1

@erniee and I figured out the issues and successfully created a rstudio image that can be launched directly. Thank you for your help @cboettig and @yuvipanda.

On a different topic, is there a way to make "Sign Out" button in Rstudio also sign the user out of Jupyterhub? This is a feature that would be useful (but may be difficult to implement) for using Rstudio within Jupyterhub. Right now, logging out of Rstudio gives an error: "Missing or incorrect token."

from binder.

brooksambrose avatar brooksambrose commented on June 21, 2024

Don't know if it's a feature of if it just needs to be documented, but in order to let users have unrestricted access to the contents of the repository, including .git, they must include a Dockerfile like this:

FROM w201rdada/portfolio:657d111
USER root
COPY . /home/rstudio/
RUN chown -R rstudio:rstudio * .*
USER ${NB_USER}

Where FROM is my own extension of rocker/binder. This is necessary because I assume the repo is cloned as root and not as rstudio, but perhaps that could be changed upstream to render this part unnecessary.

Giving users unrestricted access to the contents of the repo would seem to be the default desired behavior. Could this outcome be implemented in the base image?

from binder.

cboettig avatar cboettig commented on June 21, 2024

I believe this is documented already: http://mybinder.readthedocs.io/en/latest/dockerfile.html#preparing-your-dockerfile

problem is that COPY needs root. Generally it's good to avoid COPY since it breaks docker caching anyway, you can always do a git clone or wget in a RUN command to get data from an S3 bucket or github etc

from binder.

syoh avatar syoh commented on June 21, 2024

@cboettig @yuvipanda

We have a working Jupyterhub installation, and we were wondering if there is a way to use this docker image as a drop-in image for Jupyterhub and launch R studio directly? This example for Binder seems encouraging.

In other words, a user would login through Jupyterhub and the first page they see would be R studio web-IDE as opposed to choosing RStudio Session from the menu.

from binder.

cboettig avatar cboettig commented on June 21, 2024

@syoh I think that should already work, provided you include the ?url=rstudio as in https://github.com/rocker-org/binder#opening-rstudio-once-binder-launches ?

from binder.

yuvipanda avatar yuvipanda commented on June 21, 2024

For JupyterHub, you should be able to set c.Spawner.default_url = "/rstudio" to have users directly get into RStudio when they log in.

from binder.

syoh avatar syoh commented on June 21, 2024

@yuvipanda Cool! We will try that

from binder.

erniee avatar erniee commented on June 21, 2024

For JupyterHub, you should be able to set c.Spawner.default_url = "/rstudio" to have users directly get into RStudio when they log in.

@yuvipanda

Would this be the same jupyterhub on kubernetes?
I'm having the same issue as @syoh.
I'm also using the rocker/binder image.

Would this work in my config.yaml?

singleuser:
  defaultUrl: "/rstudio"
  image:
    name: rocker/binder
    tag: 3.5.1

This is the error that I receive:

2018-09-24 22:28:26+00:00 [Warning] Error: failed to start container "notebook": Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "exec: \"jupyterhub-singleuser\": executable file not found in $PATH"

from binder.

yuvipanda avatar yuvipanda commented on June 21, 2024

@erniee I think the python package 'jupyterhub' needs to be installed in the image. I think rocker/binder doesn't have that?

from binder.

cboettig avatar cboettig commented on June 21, 2024

@yuvipanda correct, that's not currently in the Dockerfile, maybe we should add that.

but I'm a bit lost here: what's the advantage of installing jupyterhub and adding a defaultUrl parameter in a separate config file to go directly to RStudio, vs just including the ?url=rstudio to go directly to rstudio (which is working for me in the current image, at least with binderhub). Sorry, I'm probably not following something obvious here about the context

from binder.

erniee avatar erniee commented on June 21, 2024

Thank you @cboettig
@yuvipanda I may be using the wrong image but I wanted to setup z2jh to use an image that could automatically launch rstudio. I may be using the wrong image to do that with. With your help, I have this working but I do have a problem, saving files to the persistent storage is still an issue.

The home directory is set to /home/rstudio and persistent storage is mounted on /home/jovyan

Please let me know if there is a better image to use.

from binder.

cboettig avatar cboettig commented on June 21, 2024

@erniee Maybe @yuvipanda is already aware of the details you refer to so I'm happy to defer to him, but it would help me to have a bit more understanding of what you are trying to do.

If you simply want to setup an RStudio server instance, and you want persistent data storage, the standard Rocker images work pretty well in this context. e.g. See the rocker docs for persistent storage: https://www.rocker-project.org/use/shared_volumes/. Sorry if I'm just missing the context of what you want to do, I'll defer to Yuvi on the jupterhub side.

from binder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.