{"action":"created","comment":{"url":"https://api.github.com/repos/nteract/hydrogen/pulls/comments/90442148","pull_request_review_id":10959854,"id":90442148,"diff_hunk":"@@ -247,11 +247,223 @@ Unlike with local kernels, Hydrogen does not kill remote kernels when it disconn\n \n **Note:** Unlike a notebook server, the jupyter kernel gateway by default disables listing already-running kernels. This means that once disconnected from a kernel, you will not be able to reconnect to it. You can set `c.KernelGatewayApp.list_kernels = True` in your kernel gateway configuration to change this behavior.\n \n+### Example remote kernel gateway\n+\n+To create a remote kernel gateway you could\n+\n+- Install Jupyter Kernel Gateway:\n+\n+```bash\n+pip install jupyter_kernel_gateway\n+```\n+\n+- Run the kernel gateway with parameters specifying the IP address and port to listen to, e.g.:\n+\n+```bash\n+jupyter kernelgateway --ip=0.0.0.0 --port=8888\n+```\n+\n+**Note**: \"`0.0.0.0`\" means \"listen to all IPs, including public IPs\".\n+\n+## Docker execution via kernel gateways\n+\n+You can use the same technique to create a kernel gateway in a Docker container. That would allow you to develop from Atom but with all the dependencies, autocompletion, environment, etc. of a Docker container.\n+\n+But, due to the way that the kernel gateway creates sub-processes for each kernel, you have to use it in a special way, you can't run the `jupyter kernelgateway` directly in your `Dockerfile` `CMD` section. You need to call it with an init manager such as [tini](https://github.com/krallin/tini) or run it from an interactive console.\n+\n+Here's an example of how to setup a Docker execution environment with Hydrogen running the kernel gateway from an interactive console:\n+\n+### Example Docker kernel gateway\n+\n+#### Dockerfile\n+\n+- Create a `Dockerfile`\n+- Install `jupyter_kernel_gateway` in your `Dockerfile`\n+- Expose the gateway port, in this example it will be `8888`:\n+\n+```Dockerfile\n+FROM python:2.7\n+\n+# Remove in production","path":"README.md","position":41,"original_position":41,"commit_id":"02a08070377c843380ca43ae93baa1da844f49e7","original_commit_id":"02a08070377c843380ca43ae93baa1da844f49e7","user":{"login":"tiangolo","id":1326112,"avatar_url":"https://avatars.githubusercontent.com/u/1326112?v=3","gravatar_id":"","url":"https://api.github.com/users/tiangolo","html_url":"https://github.com/tiangolo","followers_url":"https://api.github.com/users/tiangolo/followers","following_url":"https://api.github.com/users/tiangolo/following{/other_user}","gists_url":"https://api.github.com/users/tiangolo/gists{/gist_id}","starred_url":"https://api.github.com/users/tiangolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiangolo/subscriptions","organizations_url":"https://api.github.com/users/tiangolo/orgs","repos_url":"https://api.github.com/users/tiangolo/repos","events_url":"https://api.github.com/users/tiangolo/events{/privacy}","received_events_url":"https://api.github.com/users/tiangolo/received_events","type":"User","site_admin":false},"body":"That is just a comment that could be omitted, but it might remind someone that those 2 lines are only for development.\r\n\r\nThe block (of 2 lines) in the `Dockerfile` below the comment are the ones to be removed or commented out in production. For development it would look like:\r\n\r\n```Dockerfile\r\n# Remove in production\r\nRUN pip install jupyter_kernel_gateway\r\nEXPOSE 8888\r\n```\r\n\r\nAnd for production it could be:\r\n\r\n```Dockerfile\r\n# Remove in production\r\n# RUN pip install jupyter_kernel_gateway\r\n# EXPOSE 8888\r\n```\r\n\r\nAlthough, as commented above, the user could test his \"production\" environment without commenting out those lines in his `Dockerfile`, just by running the container normally, without overriding the default command with the loop and without having to re-build the image.","created_at":"2016-12-01T13:04:56Z","updated_at":"2016-12-01T13:04:56Z","html_url":"https://github.com/nteract/hydrogen/pull/524#discussion_r90442148","pull_request_url":"https://api.github.com/repos/nteract/hydrogen/pulls/524","_links":{"self":{"href":"https://api.github.com/repos/nteract/hydrogen/pulls/comments/90442148"},"html":{"href":"https://github.com/nteract/hydrogen/pull/524#discussion_r90442148"},"pull_request":{"href":"https://api.github.com/repos/nteract/hydrogen/pulls/524"}}},"pull_request":{"url":"https://api.github.com/repos/nteract/hydrogen/pulls/524","id":96005660,"html_url":"https://github.com/nteract/hydrogen/pull/524","diff_url":"https://github.com/nteract/hydrogen/pull/524.diff","patch_url":"https://github.com/nteract/hydrogen/pull/524.patch","issue_url":"https://api.github.com/repos/nteract/hydrogen/issues/524","number":524,"state":"open","locked":false,"title":"Update README.md with Kernel Gateway instructions for Docker","user":{"login":"tiangolo","id":1326112,"avatar_url":"https://avatars.githubusercontent.com/u/1326112?v=3","gravatar_id":"","url":"https://api.github.com/users/tiangolo","html_url":"https://github.com/tiangolo","followers_url":"https://api.github.com/users/tiangolo/followers","following_url":"https://api.github.com/users/tiangolo/following{/other_user}","gists_url":"https://api.github.com/users/tiangolo/gists{/gist_id}","starred_url":"https://api.github.com/users/tiangolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiangolo/subscriptions","organizations_url":"https://api.github.com/users/tiangolo/orgs","repos_url":"https://api.github.com/users/tiangolo/repos","events_url":"https://api.github.com/users/tiangolo/events{/privacy}","received_events_url":"https://api.github.com/users/tiangolo/received_events","type":"User","site_admin":false},"body":"# Update README.md with Kernel Gateway instructions for Docker\r\n\r\nAdd examples and tips of usage. \r\n\r\nThis would help Docker users and should be simpler than using custom kernel connection files. \r\n\r\nAlso, this would work without problems in Windows and Mac. (Actually, I wrote and tested it in a Windows machine with Docker Toolbox).\r\n\r\n---\r\n\r\nNote: I wrote the functionality to use custom kernel connection files (at least the first version) a while ago.\r\n\r\nBut now that you added support for kernel gateways, I think it should be the preferred way. I find it a lot cleaner and simpler to use. Additionally, with Kernel Gateways it works right away in non-Linux machines (Windows and Mac). :tada:\r\n\r\nBTW, awesome work with all the improvements! With Kernel Gateway support, `zmq-prebuilt` and all! :tada:  Have some :taco: :taco: :taco: and :cake: !","created_at":"2016-12-01T00:54:30Z","updated_at":"2016-12-01T13:04:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94fef2ec4371b492b3ca75d8efd48febc0b09a1b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nteract/hydrogen/pulls/524/commits","review_comments_url":"https://api.github.com/repos/nteract/hydrogen/pulls/524/comments","review_comment_url":"https://api.github.com/repos/nteract/hydrogen/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nteract/hydrogen/issues/524/comments","statuses_url":"https://api.github.com/repos/nteract/hydrogen/statuses/02a08070377c843380ca43ae93baa1da844f49e7","head":{"label":"tiangolo:update-readme-docker","ref":"update-readme-docker","sha":"02a08070377c843380ca43ae93baa1da844f49e7","user":{"login":"tiangolo","id":1326112,"avatar_url":"https://avatars.githubusercontent.com/u/1326112?v=3","gravatar_id":"","url":"https://api.github.com/users/tiangolo","html_url":"https://github.com/tiangolo","followers_url":"https://api.github.com/users/tiangolo/followers","following_url":"https://api.github.com/users/tiangolo/following{/other_user}","gists_url":"https://api.github.com/users/tiangolo/gists{/gist_id}","starred_url":"https://api.github.com/users/tiangolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiangolo/subscriptions","organizations_url":"https://api.github.com/users/tiangolo/orgs","repos_url":"https://api.github.com/users/tiangolo/repos","events_url":"https://api.github.com/users/tiangolo/events{/privacy}","received_events_url":"https://api.github.com/users/tiangolo/received_events","type":"User","site_admin":false},"repo":{"id":61052069,"name":"hydrogen","full_name":"tiangolo/hydrogen","owner":{"login":"tiangolo","id":1326112,"avatar_url":"https://avatars.githubusercontent.com/u/1326112?v=3","gravatar_id":"","url":"https://api.github.com/users/tiangolo","html_url":"https://github.com/tiangolo","followers_url":"https://api.github.com/users/tiangolo/followers","following_url":"https://api.github.com/users/tiangolo/following{/other_user}","gists_url":"https://api.github.com/users/tiangolo/gists{/gist_id}","starred_url":"https://api.github.com/users/tiangolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiangolo/subscriptions","organizations_url":"https://api.github.com/users/tiangolo/orgs","repos_url":"https://api.github.com/users/tiangolo/repos","events_url":"https://api.github.com/users/tiangolo/events{/privacy}","received_events_url":"https://api.github.com/users/tiangolo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tiangolo/hydrogen","description":":hash: Run code inline in Atom using Jupyter kernels","fork":true,"url":"https://api.github.com/repos/tiangolo/hydrogen","forks_url":"https://api.github.com/repos/tiangolo/hydrogen/forks","keys_url":"https://api.github.com/repos/tiangolo/hydrogen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tiangolo/hydrogen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tiangolo/hydrogen/teams","hooks_url":"https://api.github.com/repos/tiangolo/hydrogen/hooks","issue_events_url":"https://api.github.com/repos/tiangolo/hydrogen/issues/events{/number}","events_url":"https://api.github.com/repos/tiangolo/hydrogen/events","assignees_url":"https://api.github.com/repos/tiangolo/hydrogen/assignees{/user}","branches_url":"https://api.github.com/repos/tiangolo/hydrogen/branches{/branch}","tags_url":"https://api.github.com/repos/tiangolo/hydrogen/tags","blobs_url":"https://api.github.com/repos/tiangolo/hydrogen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tiangolo/hydrogen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tiangolo/hydrogen/git/refs{/sha}","trees_url":"https://api.github.com/repos/tiangolo/hydrogen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tiangolo/hydrogen/statuses/{sha}","languages_url":"https://api.github.com/repos/tiangolo/hydrogen/languages","stargazers_url":"https://api.github.com/repos/tiangolo/hydrogen/stargazers","contributors_url":"https://api.github.com/repos/tiangolo/hydrogen/contributors","subscribers_url":"https://api.github.com/repos/tiangolo/hydrogen/subscribers","subscription_url":"https://api.github.com/repos/tiangolo/hydrogen/subscription","commits_url":"https://api.github.com/repos/tiangolo/hydrogen/commits{/sha}","git_commits_url":"https://api.github.com/repos/tiangolo/hydrogen/git/commits{/sha}","comments_url":"https://api.github.com/repos/tiangolo/hydrogen/comments{/number}","issue_comment_url":"https://api.github.com/repos/tiangolo/hydrogen/issues/comments{/number}","contents_url":"https://api.github.com/repos/tiangolo/hydrogen/contents/{+path}","compare_url":"https://api.github.com/repos/tiangolo/hydrogen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tiangolo/hydrogen/merges","archive_url":"https://api.github.com/repos/tiangolo/hydrogen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tiangolo/hydrogen/downloads","issues_url":"https://api.github.com/repos/tiangolo/hydrogen/issues{/number}","pulls_url":"https://api.github.com/repos/tiangolo/hydrogen/pulls{/number}","milestones_url":"https://api.github.com/repos/tiangolo/hydrogen/milestones{/number}","notifications_url":"https://api.github.com/repos/tiangolo/hydrogen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tiangolo/hydrogen/labels{/name}","releases_url":"https://api.github.com/repos/tiangolo/hydrogen/releases{/id}","deployments_url":"https://api.github.com/repos/tiangolo/hydrogen/deployments","created_at":"2016-06-13T16:27:48Z","updated_at":"2016-12-01T00:57:15Z","pushed_at":"2016-12-01T00:57:09Z","git_url":"git://github.com/tiangolo/hydrogen.git","ssh_url":"git@github.com:tiangolo/hydrogen.git","clone_url":"https://github.com/tiangolo/hydrogen.git","svn_url":"https://github.com/tiangolo/hydrogen","homepage":"https://atom.io/packages/hydrogen","size":703,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nteract:master","ref":"master","sha":"de11381047f2aab2af55b5756c485f40330b08eb","user":{"login":"nteract","id":12401040,"avatar_url":"https://avatars.githubusercontent.com/u/12401040?v=3","gravatar_id":"","url":"https://api.github.com/users/nteract","html_url":"https://github.com/nteract","followers_url":"https://api.github.com/users/nteract/followers","following_url":"https://api.github.com/users/nteract/following{/other_user}","gists_url":"https://api.github.com/users/nteract/gists{/gist_id}","starred_url":"https://api.github.com/users/nteract/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nteract/subscriptions","organizations_url":"https://api.github.com/users/nteract/orgs","repos_url":"https://api.github.com/users/nteract/repos","events_url":"https://api.github.com/users/nteract/events{/privacy}","received_events_url":"https://api.github.com/users/nteract/received_events","type":"Organization","site_admin":false},"repo":{"id":35395056,"name":"hydrogen","full_name":"nteract/hydrogen","owner":{"login":"nteract","id":12401040,"avatar_url":"https://avatars.githubusercontent.com/u/12401040?v=3","gravatar_id":"","url":"https://api.github.com/users/nteract","html_url":"https://github.com/nteract","followers_url":"https://api.github.com/users/nteract/followers","following_url":"https://api.github.com/users/nteract/following{/other_user}","gists_url":"https://api.github.com/users/nteract/gists{/gist_id}","starred_url":"https://api.github.com/users/nteract/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nteract/subscriptions","organizations_url":"https://api.github.com/users/nteract/orgs","repos_url":"https://api.github.com/users/nteract/repos","events_url":"https://api.github.com/users/nteract/events{/privacy}","received_events_url":"https://api.github.com/users/nteract/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nteract/hydrogen","description":":eight_spoked_asterisk: Run code inline in Atom using Jupyter kernels","fork":false,"url":"https://api.github.com/repos/nteract/hydrogen","forks_url":"https://api.github.com/repos/nteract/hydrogen/forks","keys_url":"https://api.github.com/repos/nteract/hydrogen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nteract/hydrogen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nteract/hydrogen/teams","hooks_url":"https://api.github.com/repos/nteract/hydrogen/hooks","issue_events_url":"https://api.github.com/repos/nteract/hydrogen/issues/events{/number}","events_url":"https://api.github.com/repos/nteract/hydrogen/events","assignees_url":"https://api.github.com/repos/nteract/hydrogen/assignees{/user}","branches_url":"https://api.github.com/repos/nteract/hydrogen/branches{/branch}","tags_url":"https://api.github.com/repos/nteract/hydrogen/tags","blobs_url":"https://api.github.com/repos/nteract/hydrogen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nteract/hydrogen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nteract/hydrogen/git/refs{/sha}","trees_url":"https://api.github.com/repos/nteract/hydrogen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nteract/hydrogen/statuses/{sha}","languages_url":"https://api.github.com/repos/nteract/hydrogen/languages","stargazers_url":"https://api.github.com/repos/nteract/hydrogen/stargazers","contributors_url":"https://api.github.com/repos/nteract/hydrogen/contributors","subscribers_url":"https://api.github.com/repos/nteract/hydrogen/subscribers","subscription_url":"https://api.github.com/repos/nteract/hydrogen/subscription","commits_url":"https://api.github.com/repos/nteract/hydrogen/commits{/sha}","git_commits_url":"https://api.github.com/repos/nteract/hydrogen/git/commits{/sha}","comments_url":"https://api.github.com/repos/nteract/hydrogen/comments{/number}","issue_comment_url":"https://api.github.com/repos/nteract/hydrogen/issues/comments{/number}","contents_url":"https://api.github.com/repos/nteract/hydrogen/contents/{+path}","compare_url":"https://api.github.com/repos/nteract/hydrogen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nteract/hydrogen/merges","archive_url":"https://api.github.com/repos/nteract/hydrogen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nteract/hydrogen/downloads","issues_url":"https://api.github.com/repos/nteract/hydrogen/issues{/number}","pulls_url":"https://api.github.com/repos/nteract/hydrogen/pulls{/number}","milestones_url":"https://api.github.com/repos/nteract/hydrogen/milestones{/number}","notifications_url":"https://api.github.com/repos/nteract/hydrogen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nteract/hydrogen/labels{/name}","releases_url":"https://api.github.com/repos/nteract/hydrogen/releases{/id}","deployments_url":"https://api.github.com/repos/nteract/hydrogen/deployments","created_at":"2015-05-11T01:16:55Z","updated_at":"2016-12-01T10:48:56Z","pushed_at":"2016-12-01T12:30:25Z","git_url":"git://github.com/nteract/hydrogen.git","ssh_url":"git@github.com:nteract/hydrogen.git","clone_url":"https://github.com/nteract/hydrogen.git","svn_url":"https://github.com/nteract/hydrogen","homepage":"https://atom.io/packages/hydrogen","size":748,"stargazers_count":1766,"watchers_count":1766,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":54,"mirror_url":null,"open_issues_count":42,"forks":54,"open_issues":42,"watchers":1766,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nteract/hydrogen/pulls/524"},"html":{"href":"https://github.com/nteract/hydrogen/pull/524"},"issue":{"href":"https://api.github.com/repos/nteract/hydrogen/issues/524"},"comments":{"href":"https://api.github.com/repos/nteract/hydrogen/issues/524/comments"},"review_comments":{"href":"https://api.github.com/repos/nteract/hydrogen/pulls/524/comments"},"review_comment":{"href":"https://api.github.com/repos/nteract/hydrogen/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nteract/hydrogen/pulls/524/commits"},"statuses":{"href":"https://api.github.com/repos/nteract/hydrogen/statuses/02a08070377c843380ca43ae93baa1da844f49e7"}}}}
{"actor":{"display_login":"tiangolo"}}