{"action":"created","comment":{"url":"https://api.github.com/repos/codalab/codalab-cli/pulls/comments/99070899","pull_request_review_id":19732729,"id":99070899,"diff_hunk":"@@ -1192,6 +1208,119 @@ def do_run_command(self, args):\n         self.wait(client, args, new_bundle['uuid'])\n \n     @Commands.command(\n+        'run-local',\n+        help='Run a run bundle locally.',\n+        arguments=(\n+            Commands.Argument('target_spec', help=ALIASED_TARGET_SPEC_FORMAT, nargs='*', completer=TargetsCompleter),\n+            Commands.Argument('command', metavar='[---] command', help='Arbitrary Linux command to execute.', completer=NullCompleter),\n+            Commands.Argument('-w', '--worksheet-spec', help='Operate on this worksheet (%s).' % WORKSHEET_SPEC_FORMAT, completer=WorksheetsCompleter),\n+        ) + Commands.metadata_arguments([RunBundle]) + EDIT_ARGUMENTS + WAIT_ARGUMENTS,\n+    )\n+    def do_run_local_command(self, args):\n+        client, worksheet_uuid = self.parse_client_worksheet_uuid(args.worksheet_spec)\n+        args.target_spec, args.command = cli_util.desugar_command(args.target_spec, args.command)\n+        targets = self.parse_key_targets(client, worksheet_uuid, args.target_spec)\n+        metadata = self.get_missing_metadata(RunBundle, args)\n+\n+        docker_image = metadata.get('request_docker_image', 'ubuntu:14.04')\n+        if not docker_image:\n+            docker_image = 'ubuntu:14.04'\n+\n+        uuid = generate_uuid()\n+        bundle_path = '/opt/{}'.format(uuid)","path":"codalab/lib/bundle_cli.py","position":78,"original_position":78,"commit_id":"3f5ff458a1d2500e3613cfae254433269c3acda2","original_commit_id":"3f5ff458a1d2500e3613cfae254433269c3acda2","user":{"login":"fabeschan","id":4369332,"avatar_url":"https://avatars.githubusercontent.com/u/4369332?v=3","gravatar_id":"","url":"https://api.github.com/users/fabeschan","html_url":"https://github.com/fabeschan","followers_url":"https://api.github.com/users/fabeschan/followers","following_url":"https://api.github.com/users/fabeschan/following{/other_user}","gists_url":"https://api.github.com/users/fabeschan/gists{/gist_id}","starred_url":"https://api.github.com/users/fabeschan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabeschan/subscriptions","organizations_url":"https://api.github.com/users/fabeschan/orgs","repos_url":"https://api.github.com/users/fabeschan/repos","events_url":"https://api.github.com/users/fabeschan/events{/privacy}","received_events_url":"https://api.github.com/users/fabeschan/received_events","type":"User","site_admin":false},"body":"Would it be better for bundle paths to be set in config? Having local bundles in one directory could make periodic clean-ups easier. If so, what path would be a good default?","created_at":"2017-02-02T08:33:30Z","updated_at":"2017-02-02T08:33:30Z","html_url":"https://github.com/codalab/codalab-cli/pull/660#discussion_r99070899","pull_request_url":"https://api.github.com/repos/codalab/codalab-cli/pulls/660","_links":{"self":{"href":"https://api.github.com/repos/codalab/codalab-cli/pulls/comments/99070899"},"html":{"href":"https://github.com/codalab/codalab-cli/pull/660#discussion_r99070899"},"pull_request":{"href":"https://api.github.com/repos/codalab/codalab-cli/pulls/660"}}},"pull_request":{"url":"https://api.github.com/repos/codalab/codalab-cli/pulls/660","id":103444278,"html_url":"https://github.com/codalab/codalab-cli/pull/660","diff_url":"https://github.com/codalab/codalab-cli/pull/660.diff","patch_url":"https://github.com/codalab/codalab-cli/pull/660.patch","issue_url":"https://api.github.com/repos/codalab/codalab-cli/issues/660","number":660,"state":"open","locked":false,"title":"Support Local Development","user":{"login":"fabeschan","id":4369332,"avatar_url":"https://avatars.githubusercontent.com/u/4369332?v=3","gravatar_id":"","url":"https://api.github.com/users/fabeschan","html_url":"https://github.com/fabeschan","followers_url":"https://api.github.com/users/fabeschan/followers","following_url":"https://api.github.com/users/fabeschan/following{/other_user}","gists_url":"https://api.github.com/users/fabeschan/gists{/gist_id}","starred_url":"https://api.github.com/users/fabeschan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabeschan/subscriptions","organizations_url":"https://api.github.com/users/fabeschan/orgs","repos_url":"https://api.github.com/users/fabeschan/repos","events_url":"https://api.github.com/users/fabeschan/events{/privacy}","received_events_url":"https://api.github.com/users/fabeschan/received_events","type":"User","site_admin":false},"body":"hi","created_at":"2017-01-27T06:31:50Z","updated_at":"2017-02-02T08:33:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f2ca77d561371d2aead6f793789909c86eec1e1","assignee":{"login":"fabeschan","id":4369332,"avatar_url":"https://avatars.githubusercontent.com/u/4369332?v=3","gravatar_id":"","url":"https://api.github.com/users/fabeschan","html_url":"https://github.com/fabeschan","followers_url":"https://api.github.com/users/fabeschan/followers","following_url":"https://api.github.com/users/fabeschan/following{/other_user}","gists_url":"https://api.github.com/users/fabeschan/gists{/gist_id}","starred_url":"https://api.github.com/users/fabeschan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabeschan/subscriptions","organizations_url":"https://api.github.com/users/fabeschan/orgs","repos_url":"https://api.github.com/users/fabeschan/repos","events_url":"https://api.github.com/users/fabeschan/events{/privacy}","received_events_url":"https://api.github.com/users/fabeschan/received_events","type":"User","site_admin":false},"assignees":[{"login":"fabeschan","id":4369332,"avatar_url":"https://avatars.githubusercontent.com/u/4369332?v=3","gravatar_id":"","url":"https://api.github.com/users/fabeschan","html_url":"https://github.com/fabeschan","followers_url":"https://api.github.com/users/fabeschan/followers","following_url":"https://api.github.com/users/fabeschan/following{/other_user}","gists_url":"https://api.github.com/users/fabeschan/gists{/gist_id}","starred_url":"https://api.github.com/users/fabeschan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabeschan/subscriptions","organizations_url":"https://api.github.com/users/fabeschan/orgs","repos_url":"https://api.github.com/users/fabeschan/repos","events_url":"https://api.github.com/users/fabeschan/events{/privacy}","received_events_url":"https://api.github.com/users/fabeschan/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/codalab/codalab-cli/pulls/660/commits","review_comments_url":"https://api.github.com/repos/codalab/codalab-cli/pulls/660/comments","review_comment_url":"https://api.github.com/repos/codalab/codalab-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codalab/codalab-cli/issues/660/comments","statuses_url":"https://api.github.com/repos/codalab/codalab-cli/statuses/3f5ff458a1d2500e3613cfae254433269c3acda2","head":{"label":"codalab:fix/local-dev","ref":"fix/local-dev","sha":"3f5ff458a1d2500e3613cfae254433269c3acda2","user":{"login":"codalab","id":4633552,"avatar_url":"https://avatars.githubusercontent.com/u/4633552?v=3","gravatar_id":"","url":"https://api.github.com/users/codalab","html_url":"https://github.com/codalab","followers_url":"https://api.github.com/users/codalab/followers","following_url":"https://api.github.com/users/codalab/following{/other_user}","gists_url":"https://api.github.com/users/codalab/gists{/gist_id}","starred_url":"https://api.github.com/users/codalab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codalab/subscriptions","organizations_url":"https://api.github.com/users/codalab/orgs","repos_url":"https://api.github.com/users/codalab/repos","events_url":"https://api.github.com/users/codalab/events{/privacy}","received_events_url":"https://api.github.com/users/codalab/received_events","type":"Organization","site_admin":false},"repo":{"id":27352490,"name":"codalab-cli","full_name":"codalab/codalab-cli","owner":{"login":"codalab","id":4633552,"avatar_url":"https://avatars.githubusercontent.com/u/4633552?v=3","gravatar_id":"","url":"https://api.github.com/users/codalab","html_url":"https://github.com/codalab","followers_url":"https://api.github.com/users/codalab/followers","following_url":"https://api.github.com/users/codalab/following{/other_user}","gists_url":"https://api.github.com/users/codalab/gists{/gist_id}","starred_url":"https://api.github.com/users/codalab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codalab/subscriptions","organizations_url":"https://api.github.com/users/codalab/orgs","repos_url":"https://api.github.com/users/codalab/repos","events_url":"https://api.github.com/users/codalab/events{/privacy}","received_events_url":"https://api.github.com/users/codalab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codalab/codalab-cli","description":"Bundle service and command-line interface for supporting worksheets in CodaLab.","fork":false,"url":"https://api.github.com/repos/codalab/codalab-cli","forks_url":"https://api.github.com/repos/codalab/codalab-cli/forks","keys_url":"https://api.github.com/repos/codalab/codalab-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codalab/codalab-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codalab/codalab-cli/teams","hooks_url":"https://api.github.com/repos/codalab/codalab-cli/hooks","issue_events_url":"https://api.github.com/repos/codalab/codalab-cli/issues/events{/number}","events_url":"https://api.github.com/repos/codalab/codalab-cli/events","assignees_url":"https://api.github.com/repos/codalab/codalab-cli/assignees{/user}","branches_url":"https://api.github.com/repos/codalab/codalab-cli/branches{/branch}","tags_url":"https://api.github.com/repos/codalab/codalab-cli/tags","blobs_url":"https://api.github.com/repos/codalab/codalab-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codalab/codalab-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codalab/codalab-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/codalab/codalab-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codalab/codalab-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/codalab/codalab-cli/languages","stargazers_url":"https://api.github.com/repos/codalab/codalab-cli/stargazers","contributors_url":"https://api.github.com/repos/codalab/codalab-cli/contributors","subscribers_url":"https://api.github.com/repos/codalab/codalab-cli/subscribers","subscription_url":"https://api.github.com/repos/codalab/codalab-cli/subscription","commits_url":"https://api.github.com/repos/codalab/codalab-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/codalab/codalab-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/codalab/codalab-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/codalab/codalab-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/codalab/codalab-cli/contents/{+path}","compare_url":"https://api.github.com/repos/codalab/codalab-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codalab/codalab-cli/merges","archive_url":"https://api.github.com/repos/codalab/codalab-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codalab/codalab-cli/downloads","issues_url":"https://api.github.com/repos/codalab/codalab-cli/issues{/number}","pulls_url":"https://api.github.com/repos/codalab/codalab-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/codalab/codalab-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/codalab/codalab-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codalab/codalab-cli/labels{/name}","releases_url":"https://api.github.com/repos/codalab/codalab-cli/releases{/id}","deployments_url":"https://api.github.com/repos/codalab/codalab-cli/deployments","created_at":"2014-11-30T22:33:18Z","updated_at":"2017-01-31T03:14:43Z","pushed_at":"2017-02-01T21:49:53Z","git_url":"git://github.com/codalab/codalab-cli.git","ssh_url":"git@github.com:codalab/codalab-cli.git","clone_url":"https://github.com/codalab/codalab-cli.git","svn_url":"https://github.com/codalab/codalab-cli","homepage":null,"size":3929,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":83,"forks":14,"open_issues":83,"watchers":13,"default_branch":"master"}},"base":{"label":"codalab:develop","ref":"develop","sha":"80ac4877f2e3d1fced587ac88d52a42d7c94b4e8","user":{"login":"codalab","id":4633552,"avatar_url":"https://avatars.githubusercontent.com/u/4633552?v=3","gravatar_id":"","url":"https://api.github.com/users/codalab","html_url":"https://github.com/codalab","followers_url":"https://api.github.com/users/codalab/followers","following_url":"https://api.github.com/users/codalab/following{/other_user}","gists_url":"https://api.github.com/users/codalab/gists{/gist_id}","starred_url":"https://api.github.com/users/codalab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codalab/subscriptions","organizations_url":"https://api.github.com/users/codalab/orgs","repos_url":"https://api.github.com/users/codalab/repos","events_url":"https://api.github.com/users/codalab/events{/privacy}","received_events_url":"https://api.github.com/users/codalab/received_events","type":"Organization","site_admin":false},"repo":{"id":27352490,"name":"codalab-cli","full_name":"codalab/codalab-cli","owner":{"login":"codalab","id":4633552,"avatar_url":"https://avatars.githubusercontent.com/u/4633552?v=3","gravatar_id":"","url":"https://api.github.com/users/codalab","html_url":"https://github.com/codalab","followers_url":"https://api.github.com/users/codalab/followers","following_url":"https://api.github.com/users/codalab/following{/other_user}","gists_url":"https://api.github.com/users/codalab/gists{/gist_id}","starred_url":"https://api.github.com/users/codalab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codalab/subscriptions","organizations_url":"https://api.github.com/users/codalab/orgs","repos_url":"https://api.github.com/users/codalab/repos","events_url":"https://api.github.com/users/codalab/events{/privacy}","received_events_url":"https://api.github.com/users/codalab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codalab/codalab-cli","description":"Bundle service and command-line interface for supporting worksheets in CodaLab.","fork":false,"url":"https://api.github.com/repos/codalab/codalab-cli","forks_url":"https://api.github.com/repos/codalab/codalab-cli/forks","keys_url":"https://api.github.com/repos/codalab/codalab-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codalab/codalab-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codalab/codalab-cli/teams","hooks_url":"https://api.github.com/repos/codalab/codalab-cli/hooks","issue_events_url":"https://api.github.com/repos/codalab/codalab-cli/issues/events{/number}","events_url":"https://api.github.com/repos/codalab/codalab-cli/events","assignees_url":"https://api.github.com/repos/codalab/codalab-cli/assignees{/user}","branches_url":"https://api.github.com/repos/codalab/codalab-cli/branches{/branch}","tags_url":"https://api.github.com/repos/codalab/codalab-cli/tags","blobs_url":"https://api.github.com/repos/codalab/codalab-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codalab/codalab-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codalab/codalab-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/codalab/codalab-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codalab/codalab-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/codalab/codalab-cli/languages","stargazers_url":"https://api.github.com/repos/codalab/codalab-cli/stargazers","contributors_url":"https://api.github.com/repos/codalab/codalab-cli/contributors","subscribers_url":"https://api.github.com/repos/codalab/codalab-cli/subscribers","subscription_url":"https://api.github.com/repos/codalab/codalab-cli/subscription","commits_url":"https://api.github.com/repos/codalab/codalab-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/codalab/codalab-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/codalab/codalab-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/codalab/codalab-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/codalab/codalab-cli/contents/{+path}","compare_url":"https://api.github.com/repos/codalab/codalab-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codalab/codalab-cli/merges","archive_url":"https://api.github.com/repos/codalab/codalab-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codalab/codalab-cli/downloads","issues_url":"https://api.github.com/repos/codalab/codalab-cli/issues{/number}","pulls_url":"https://api.github.com/repos/codalab/codalab-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/codalab/codalab-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/codalab/codalab-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codalab/codalab-cli/labels{/name}","releases_url":"https://api.github.com/repos/codalab/codalab-cli/releases{/id}","deployments_url":"https://api.github.com/repos/codalab/codalab-cli/deployments","created_at":"2014-11-30T22:33:18Z","updated_at":"2017-01-31T03:14:43Z","pushed_at":"2017-02-01T21:49:53Z","git_url":"git://github.com/codalab/codalab-cli.git","ssh_url":"git@github.com:codalab/codalab-cli.git","clone_url":"https://github.com/codalab/codalab-cli.git","svn_url":"https://github.com/codalab/codalab-cli","homepage":null,"size":3929,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":83,"forks":14,"open_issues":83,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codalab/codalab-cli/pulls/660"},"html":{"href":"https://github.com/codalab/codalab-cli/pull/660"},"issue":{"href":"https://api.github.com/repos/codalab/codalab-cli/issues/660"},"comments":{"href":"https://api.github.com/repos/codalab/codalab-cli/issues/660/comments"},"review_comments":{"href":"https://api.github.com/repos/codalab/codalab-cli/pulls/660/comments"},"review_comment":{"href":"https://api.github.com/repos/codalab/codalab-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codalab/codalab-cli/pulls/660/commits"},"statuses":{"href":"https://api.github.com/repos/codalab/codalab-cli/statuses/3f5ff458a1d2500e3613cfae254433269c3acda2"}}}}
{"actor":{"display_login":"fabeschan"}}