{"action":"created","issue":{"url":"https://api.github.com/repos/kubeflow/kubeflow/issues/300","repository_url":"https://api.github.com/repos/kubeflow/kubeflow","labels_url":"https://api.github.com/repos/kubeflow/kubeflow/issues/300/labels{/name}","comments_url":"https://api.github.com/repos/kubeflow/kubeflow/issues/300/comments","events_url":"https://api.github.com/repos/kubeflow/kubeflow/issues/300/events","html_url":"https://github.com/kubeflow/kubeflow/issues/300","id":300413657,"number":300,"title":"Configure JupyterHub spawner to allow root operations by default","user":{"login":"cwbeitel","id":2348401,"avatar_url":"https://avatars3.githubusercontent.com/u/2348401?v=4","gravatar_id":"","url":"https://api.github.com/users/cwbeitel","html_url":"https://github.com/cwbeitel","followers_url":"https://api.github.com/users/cwbeitel/followers","following_url":"https://api.github.com/users/cwbeitel/following{/other_user}","gists_url":"https://api.github.com/users/cwbeitel/gists{/gist_id}","starred_url":"https://api.github.com/users/cwbeitel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwbeitel/subscriptions","organizations_url":"https://api.github.com/users/cwbeitel/orgs","repos_url":"https://api.github.com/users/cwbeitel/repos","events_url":"https://api.github.com/users/cwbeitel/events{/privacy}","received_events_url":"https://api.github.com/users/cwbeitel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-26T22:03:51Z","updated_at":"2018-02-27T21:33:41Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Regarding notebook server spawner options https://github.com/kubeflow/kubeflow/blob/master/kubeflow/core/jupyterhub_spawner.py#L79 currently c.KubeSpawner.args is being provided the arg\"--allow-root\" presumably because the original implementer meant for users to have root access in containers. But currently this is not available. \r\n\r\nBy adding \"GRANT_SUDO=yes\" to the environment users do have sudo privs in spawned notebooks, e.g. can successfully run `sudo apt-get update`:\r\n\r\n```python \r\n###################################################\r\n# Spawner Options\r\n###################################################\r\nc.JupyterHub.spawner_class = KubeFormSpawner\r\nc.KubeSpawner.singleuser_image_spec = 'gcr.io/kubeflow/tensorflow-notebook'\r\nc.KubeSpawner.cmd = 'start-singleuser.sh'\r\nc.KubeSpawner.args = ['--allow-root']\r\n# First pulls can be really slow, so let's give it a big timeout\r\nc.KubeSpawner.start_timeout = 60 * 10\r\nc.KubeSpawner.environment = {\r\n    \"GRANT_SUDO\": \"yes\"\r\n}\r\n```\r\n\r\nIf making this addition should determine if there is anything in c.KubeSpawner.environment to over-write and if so append the variable instead of setting all.\r\n\r\nRelated to https://github.com/kubeflow/kubeflow/issues/289"},"comment":{"url":"https://api.github.com/repos/kubeflow/kubeflow/issues/comments/369033768","html_url":"https://github.com/kubeflow/kubeflow/issues/300#issuecomment-369033768","issue_url":"https://api.github.com/repos/kubeflow/kubeflow/issues/300","id":369033768,"user":{"login":"jlewi","id":777219,"avatar_url":"https://avatars3.githubusercontent.com/u/777219?v=4","gravatar_id":"","url":"https://api.github.com/users/jlewi","html_url":"https://github.com/jlewi","followers_url":"https://api.github.com/users/jlewi/followers","following_url":"https://api.github.com/users/jlewi/following{/other_user}","gists_url":"https://api.github.com/users/jlewi/gists{/gist_id}","starred_url":"https://api.github.com/users/jlewi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlewi/subscriptions","organizations_url":"https://api.github.com/users/jlewi/orgs","repos_url":"https://api.github.com/users/jlewi/repos","events_url":"https://api.github.com/users/jlewi/events{/privacy}","received_events_url":"https://api.github.com/users/jlewi/received_events","type":"User","site_admin":false},"created_at":"2018-02-27T21:33:41Z","updated_at":"2018-02-27T21:33:41Z","author_association":"CONTRIBUTOR","body":"I think the use cases of \r\n- Mounting NFS volumes\r\n- Installing additional packages\r\n- Image building\r\n\r\nAre convincing enough that I think its worth doing until we have more reason to believe its unsafe and should disable it.\r\n"}}
{"actor":{"display_login":"jlewi"}}