{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/pai/pulls/comments/193651207","pull_request_review_id":126663264,"id":193651207,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzY1MTIwNw==","diff_hunk":"@@ -46,87 +46,18 @@ while /bin/true; do\n done &\n \n \n-printf \"%s %s\\n%s\\n\\n\" \"[INFO]\" \"HADOOP CLASSPATH\" \"$(hadoop classpath --glob)\"\n-\n export PAI_WORK_DIR=\"$(pwd)\"\n-export PAI_DEFAULT_FS_URI={{{ hdfsUri }}}\n HDFS_LAUNCHER_PREFIX=$PAI_DEFAULT_FS_URI/Container\n export CLASSPATH=\"$(hadoop classpath --glob)\"\n \n-export PAI_JOB_NAME={{{ jobData.jobName }}}\n-export PAI_USER_NAME={{{ jobData.userName }}}\n-export PAI_DATA_DIR={{{ jobData.dataDir }}}\n-export PAI_OUTPUT_DIR={{{ jobData.outputDir }}}\n-export PAI_CODE_DIR={{{ jobData.codeDir }}}\n-export PAI_CURRENT_TASK_ROLE_NAME={{{ taskData.name }}}\n-export PAI_CURRENT_TASK_ROLE_TASK_COUNT={{{ taskData.taskNumber }}}\n-export PAI_CURRENT_TASK_ROLE_CPU_COUNT={{{ taskData.cpuNumber }}}\n-export PAI_CURRENT_TASK_ROLE_MEM_MB={{{ taskData.memoryMB }}}\n-export PAI_CURRENT_TASK_ROLE_GPU_COUNT={{{ taskData.gpuNumber }}}\n-export PAI_JOB_TASK_COUNT={{{ tasksNumber }}}\n-export PAI_JOB_TASK_ROLE_COUNT={{{ taskRolesNumber }}}\n-export PAI_JOB_TASK_ROLE_LIST={{{ taskRoleList }}}\n-export PAI_KILL_ALL_ON_COMPLETED_TASK_NUM={{{ jobData.killAllOnCompletedTaskNumber }}}\n-\n-port_list=(${PAI_CONTAINER_HOST_PORT_LIST//;/ })\n-for ports in \"${port_list[@]}\"; do\n-  port_label=\"$(cut -f 1 -d\":\" <<< $ports)\"\n-  export PAI_CONTAINER_HOST_${port_label}_PORT_LIST=\"$(cut -f 2 -d\":\" <<< $ports)\"\n-done\n-\n-export PAI_CONTAINER_HOST_PORT=\"$(cut -f 1 -d\",\" <<< $PAI_CONTAINER_HOST_http_PORT_LIST)\"\n-export PAI_CONTAINER_SSH_PORT=\"$(cut -f 1 -d\",\" <<< $PAI_CONTAINER_HOST_ssh_PORT_LIST)\"\n-\n task_role_no={{{ idx }}}\n-# Touch a container id file in \"APP_ID-TASK_ROLE_NO-TASK_INDEX-CONTAINER_HOST_IP-CONTAINER_HOST_PORT\" format on hdfs\n-# To communicate with other containers, add APP_ID as prefix to differentiate attempts with same job name\n-hdfs dfs -touchz $HDFS_LAUNCHER_PREFIX/$PAI_USER_NAME/$PAI_JOB_NAME/tmp/$APP_ID-$task_role_no-$PAI_TASK_INDEX-$PAI_CONTAINER_HOST_IP-$PAI_CONTAINER_HOST_PORT || exit 1\n-while [ `hdfs dfs -ls $HDFS_LAUNCHER_PREFIX/$PAI_USER_NAME/$PAI_JOB_NAME/tmp/ | grep \"/$PAI_JOB_NAME/tmp/$APP_ID-\" | wc -l` -lt  $PAI_JOB_TASK_COUNT ]; do\n-  printf \"%s %s\\n\" \"[INFO]\" \"Waiting for other containers ...\"\n-  sleep 10\n-done\n-hdfs dfs -ls $HDFS_LAUNCHER_PREFIX/$PAI_USER_NAME/$PAI_JOB_NAME/tmp/ \\\n-  | grep \"/$PAI_JOB_NAME/tmp/$APP_ID-\" \\\n-  | grep -oE \"[^/]+$\" \\\n-  | sed -e \"s/^$APP_ID-//g\" \\\n-  | sort -n -k 2 -t\"-\" \\\n-  > ContainerList\n-if [ \"$(cat ContainerList | wc -l)\" -ne $PAI_JOB_TASK_COUNT ]; then\n-  printf \"%s %s\\n%s\\n%s\\n\\n\" \\\n-    \"[ERROR]\" \"ContainerList\" \\\n-    \"$(cat ContainerList)\" \\\n-    \"$(cat ContainerList | wc -l) containers are available, not equal to $PAI_JOB_TASK_COUNT, exit ...\"\n-  exit 2\n-fi\n-\n-export PAI_CURRENT_TASK_ROLE_CURRENT_TASK_INDEX=$((`cat ContainerList | grep \"^$task_role_no-\" | grep -n \"$task_role_no-$PAI_TASK_INDEX-$PAI_CONTAINER_HOST_IP-$PAI_CONTAINER_HOST_PORT\" | cut -d \":\" -f 1`-1))\n-task_role_list=(${PAI_JOB_TASK_ROLE_LIST//,/ })\n-for i in `seq 0 $((PAI_JOB_TASK_ROLE_COUNT-1))`; do\n-  host_list=`cat ContainerList | grep \"^$i-\" | cut -d \"-\" -f 3-4 | tr \"-\" \":\" | sed -e :E -e \"N;s/\\n/,/;tE\"`\n-  export PAI_TASK_ROLE_${i}_HOST_LIST=$host_list\n-  export PAI_TASK_ROLE_${task_role_list[$i]}_HOST_LIST=$host_list\n-done\n-rm ContainerList\n \n printf \"%s %s\\n%s\\n\\n\" \"[INFO]\" \"ENV\" \"$(printenv | sort)\"\n \n if [[ -n $PAI_CODE_DIR ]]; then\n   hdfs dfs -get $PAI_CODE_DIR || exit 1\n fi","path":"rest-server/src/templates/dockerContainerScript.mustache","position":70,"original_position":70,"commit_id":"e72cec30bdd9c5cfa7f5ca95eae890b94e9bfc99","original_commit_id":"e72cec30bdd9c5cfa7f5ca95eae890b94e9bfc99","user":{"login":"fanyangCS","id":5820832,"node_id":"MDQ6VXNlcjU4MjA4MzI=","avatar_url":"https://avatars2.githubusercontent.com/u/5820832?v=4","gravatar_id":"","url":"https://api.github.com/users/fanyangCS","html_url":"https://github.com/fanyangCS","followers_url":"https://api.github.com/users/fanyangCS/followers","following_url":"https://api.github.com/users/fanyangCS/following{/other_user}","gists_url":"https://api.github.com/users/fanyangCS/gists{/gist_id}","starred_url":"https://api.github.com/users/fanyangCS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fanyangCS/subscriptions","organizations_url":"https://api.github.com/users/fanyangCS/orgs","repos_url":"https://api.github.com/users/fanyangCS/repos","events_url":"https://api.github.com/users/fanyangCS/events{/privacy}","received_events_url":"https://api.github.com/users/fanyangCS/received_events","type":"User","site_admin":false},"body":"can we move this to yarnContainer, and cp to a locally mount folder. and here we move the folder ","created_at":"2018-06-07T07:36:34Z","updated_at":"2018-06-07T07:36:34Z","html_url":"https://github.com/Microsoft/pai/pull/467#discussion_r193651207","pull_request_url":"https://api.github.com/repos/Microsoft/pai/pulls/467","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/pai/pulls/comments/193651207"},"html":{"href":"https://github.com/Microsoft/pai/pull/467#discussion_r193651207"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/pai/pulls/467"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/pai/pulls/467","id":181098037,"node_id":"MDExOlB1bGxSZXF1ZXN0MTgxMDk4MDM3","html_url":"https://github.com/Microsoft/pai/pull/467","diff_url":"https://github.com/Microsoft/pai/pull/467.diff","patch_url":"https://github.com/Microsoft/pai/pull/467.patch","issue_url":"https://api.github.com/repos/Microsoft/pai/issues/467","number":467,"state":"open","locked":false,"title":"[Rest Server] Refine task role statuses env in container","user":{"login":"abuccts","id":13360214,"node_id":"MDQ6VXNlcjEzMzYwMjE0","avatar_url":"https://avatars3.githubusercontent.com/u/13360214?v=4","gravatar_id":"","url":"https://api.github.com/users/abuccts","html_url":"https://github.com/abuccts","followers_url":"https://api.github.com/users/abuccts/followers","following_url":"https://api.github.com/users/abuccts/following{/other_user}","gists_url":"https://api.github.com/users/abuccts/gists{/gist_id}","starred_url":"https://api.github.com/users/abuccts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abuccts/subscriptions","organizations_url":"https://api.github.com/users/abuccts/orgs","repos_url":"https://api.github.com/users/abuccts/repos","events_url":"https://api.github.com/users/abuccts/events{/privacy}","received_events_url":"https://api.github.com/users/abuccts/received_events","type":"User","site_admin":false},"body":"Refine task role statuses env in container. Get container host list from framework launcher webservice.","created_at":"2018-04-12T06:00:40Z","updated_at":"2018-06-07T07:36:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94438b20b998692587f4eb5c7fe25b1a3e440796","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/pai/pulls/467/commits","review_comments_url":"https://api.github.com/repos/Microsoft/pai/pulls/467/comments","review_comment_url":"https://api.github.com/repos/Microsoft/pai/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/pai/issues/467/comments","statuses_url":"https://api.github.com/repos/Microsoft/pai/statuses/e72cec30bdd9c5cfa7f5ca95eae890b94e9bfc99","head":{"label":"Microsoft:xiongyf/container-dev","ref":"xiongyf/container-dev","sha":"e72cec30bdd9c5cfa7f5ca95eae890b94e9bfc99","user":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":104741169,"node_id":"MDEwOlJlcG9zaXRvcnkxMDQ3NDExNjk=","name":"pai","full_name":"Microsoft/pai","owner":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/pai","description":"Resource scheduling and cluster management for AI","fork":false,"url":"https://api.github.com/repos/Microsoft/pai","forks_url":"https://api.github.com/repos/Microsoft/pai/forks","keys_url":"https://api.github.com/repos/Microsoft/pai/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/pai/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/pai/teams","hooks_url":"https://api.github.com/repos/Microsoft/pai/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/pai/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/pai/events","assignees_url":"https://api.github.com/repos/Microsoft/pai/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/pai/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/pai/tags","blobs_url":"https://api.github.com/repos/Microsoft/pai/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/pai/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/pai/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/pai/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/pai/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/pai/languages","stargazers_url":"https://api.github.com/repos/Microsoft/pai/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/pai/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/pai/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/pai/subscription","commits_url":"https://api.github.com/repos/Microsoft/pai/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/pai/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/pai/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/pai/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/pai/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/pai/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/pai/merges","archive_url":"https://api.github.com/repos/Microsoft/pai/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/pai/downloads","issues_url":"https://api.github.com/repos/Microsoft/pai/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/pai/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/pai/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/pai/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/pai/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/pai/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/pai/deployments","created_at":"2017-09-25T11:24:51Z","updated_at":"2018-06-07T07:27:54Z","pushed_at":"2018-06-07T07:27:52Z","git_url":"git://github.com/Microsoft/pai.git","ssh_url":"git@github.com:Microsoft/pai.git","clone_url":"https://github.com/Microsoft/pai.git","svn_url":"https://github.com/Microsoft/pai","homepage":"","size":3248,"stargazers_count":302,"watchers_count":302,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":71,"mirror_url":null,"archived":false,"open_issues_count":65,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":71,"open_issues":65,"watchers":302,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"05f90222e5275c33ef70d7b4bb42fa0e190dde71","user":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":104741169,"node_id":"MDEwOlJlcG9zaXRvcnkxMDQ3NDExNjk=","name":"pai","full_name":"Microsoft/pai","owner":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/pai","description":"Resource scheduling and cluster management for AI","fork":false,"url":"https://api.github.com/repos/Microsoft/pai","forks_url":"https://api.github.com/repos/Microsoft/pai/forks","keys_url":"https://api.github.com/repos/Microsoft/pai/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/pai/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/pai/teams","hooks_url":"https://api.github.com/repos/Microsoft/pai/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/pai/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/pai/events","assignees_url":"https://api.github.com/repos/Microsoft/pai/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/pai/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/pai/tags","blobs_url":"https://api.github.com/repos/Microsoft/pai/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/pai/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/pai/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/pai/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/pai/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/pai/languages","stargazers_url":"https://api.github.com/repos/Microsoft/pai/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/pai/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/pai/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/pai/subscription","commits_url":"https://api.github.com/repos/Microsoft/pai/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/pai/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/pai/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/pai/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/pai/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/pai/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/pai/merges","archive_url":"https://api.github.com/repos/Microsoft/pai/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/pai/downloads","issues_url":"https://api.github.com/repos/Microsoft/pai/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/pai/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/pai/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/pai/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/pai/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/pai/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/pai/deployments","created_at":"2017-09-25T11:24:51Z","updated_at":"2018-06-07T07:27:54Z","pushed_at":"2018-06-07T07:27:52Z","git_url":"git://github.com/Microsoft/pai.git","ssh_url":"git@github.com:Microsoft/pai.git","clone_url":"https://github.com/Microsoft/pai.git","svn_url":"https://github.com/Microsoft/pai","homepage":"","size":3248,"stargazers_count":302,"watchers_count":302,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":71,"mirror_url":null,"archived":false,"open_issues_count":65,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":71,"open_issues":65,"watchers":302,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/pai/pulls/467"},"html":{"href":"https://github.com/Microsoft/pai/pull/467"},"issue":{"href":"https://api.github.com/repos/Microsoft/pai/issues/467"},"comments":{"href":"https://api.github.com/repos/Microsoft/pai/issues/467/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/pai/pulls/467/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/pai/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/pai/pulls/467/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/pai/statuses/e72cec30bdd9c5cfa7f5ca95eae890b94e9bfc99"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"fanyangCS"}}