{"action":"created","issue":{"url":"https://api.github.com/repos/jupyterhub/zero-to-jupyterhub-k8s/issues/990","repository_url":"https://api.github.com/repos/jupyterhub/zero-to-jupyterhub-k8s","labels_url":"https://api.github.com/repos/jupyterhub/zero-to-jupyterhub-k8s/issues/990/labels{/name}","comments_url":"https://api.github.com/repos/jupyterhub/zero-to-jupyterhub-k8s/issues/990/comments","events_url":"https://api.github.com/repos/jupyterhub/zero-to-jupyterhub-k8s/issues/990/events","html_url":"https://github.com/jupyterhub/zero-to-jupyterhub-k8s/issues/990","id":372946585,"node_id":"MDU6SXNzdWUzNzI5NDY1ODU=","number":990,"title":"Running RStudio via z2jh-based JupyterHub","user":{"login":"ablekh","id":15176969,"node_id":"MDQ6VXNlcjE1MTc2OTY5","avatar_url":"https://avatars2.githubusercontent.com/u/15176969?v=4","gravatar_id":"","url":"https://api.github.com/users/ablekh","html_url":"https://github.com/ablekh","followers_url":"https://api.github.com/users/ablekh/followers","following_url":"https://api.github.com/users/ablekh/following{/other_user}","gists_url":"https://api.github.com/users/ablekh/gists{/gist_id}","starred_url":"https://api.github.com/users/ablekh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ablekh/subscriptions","organizations_url":"https://api.github.com/users/ablekh/orgs","repos_url":"https://api.github.com/users/ablekh/repos","events_url":"https://api.github.com/users/ablekh/events{/privacy}","received_events_url":"https://api.github.com/users/ablekh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":21,"created_at":"2018-10-23T11:18:41Z","updated_at":"2018-10-24T10:52:08Z","closed_at":null,"author_association":"NONE","body":"I'm trying to create a separate JupyterHub cluster for an upcoming workshop that requires using RStudio sessions rather than using R kernel in JupyterHub. Since a proper multi-user RStudio setup can currently only be implemented via commercial version of RStudio Server and because I want to take advantage from JupyterHub's convenient authentication mechanisms (and container-based session isolation), I was working hard to setup a z2jh-based JupyterHub cluster similarly to how Binder enables such setup.\r\n\r\nIt was my understanding that I could just specify desired version of RStudio-based Docker container image in relevant `config.yaml` without any other changes. I have done just that, selecting the Rocker distribution, specifically the `rocker/verse` image (to support LaTeX etc.). However, when, after fixing secondary issues, I tried to spawn a single-user container, I was greeted with the following error message on the progress page:\r\n\r\n```\r\n2018-10-23 10:44:04+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\"\r\n```\r\n\r\nAfter seeing this, I started thinking that, perhaps, the standard Rocker Docker images (from DockerHub) are not JupyterHub-compatible. If I'm correct on this, then I think that I could build my own relevant image from the source (https://github.com/rocker-org/rocker-versioned/tree/master/verse, I assume; though not clear whether I need to into a specific version-dir), using `jupyter-repo2docker` as suggested by @cboettig [here](https://github.com/binder-examples/r/issues/1#issue-266664801). Any help and/or advice will be much appreciated."},"comment":{"url":"https://api.github.com/repos/jupyterhub/zero-to-jupyterhub-k8s/issues/comments/432609082","html_url":"https://github.com/jupyterhub/zero-to-jupyterhub-k8s/issues/990#issuecomment-432609082","issue_url":"https://api.github.com/repos/jupyterhub/zero-to-jupyterhub-k8s/issues/990","id":432609082,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjYwOTA4Mg==","user":{"login":"manics","id":1644105,"node_id":"MDQ6VXNlcjE2NDQxMDU=","avatar_url":"https://avatars2.githubusercontent.com/u/1644105?v=4","gravatar_id":"","url":"https://api.github.com/users/manics","html_url":"https://github.com/manics","followers_url":"https://api.github.com/users/manics/followers","following_url":"https://api.github.com/users/manics/following{/other_user}","gists_url":"https://api.github.com/users/manics/gists{/gist_id}","starred_url":"https://api.github.com/users/manics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manics/subscriptions","organizations_url":"https://api.github.com/users/manics/orgs","repos_url":"https://api.github.com/users/manics/repos","events_url":"https://api.github.com/users/manics/events{/privacy}","received_events_url":"https://api.github.com/users/manics/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T10:52:08Z","updated_at":"2018-10-24T10:52:08Z","author_association":"CONTRIBUTOR","body":"Yes, you effectively create the authenticator subclass in extraConfig instead of building a custom image. Since `GitHubOAuthenticator` already passes the github username it should be fairly easy, something like this might work (I haven't tried it):\r\n```\r\nsingleuser:\r\n  uid: 0\r\n\r\nhub:\r\n  extraConfig: |\r\n    class CustomGitHubOAuthenticator(GitHubOAuthenticator):\r\n        @gen.coroutine\r\n        def pre_spawn_start(self, user, spawner):\r\n            auth_state = yield user.get_auth_state()\r\n            self.log.info('pre_spawn_start auth_state:%s' % auth_state)\r\n            if not auth_state:\r\n                return\r\n\r\n            # setup environment\r\n            spawner.environment['NB_USER'] = auth_state['github_user']\r\n```"}}
{"actor":{"display_login":"manics"}}