{"action":"created","issue":{"url":"https://api.github.com/repos/moby/moby/issues/37434","repository_url":"https://api.github.com/repos/moby/moby","labels_url":"https://api.github.com/repos/moby/moby/issues/37434/labels{/name}","comments_url":"https://api.github.com/repos/moby/moby/issues/37434/comments","events_url":"https://api.github.com/repos/moby/moby/issues/37434/events","html_url":"https://github.com/moby/moby/pull/37434","id":340025777,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwNTM4MzQw","number":37434,"title":"[WIP] api: add a GPU resource type","user":{"login":"flx42","id":3645581,"node_id":"MDQ6VXNlcjM2NDU1ODE=","avatar_url":"https://avatars3.githubusercontent.com/u/3645581?v=4","gravatar_id":"","url":"https://api.github.com/users/flx42","html_url":"https://github.com/flx42","followers_url":"https://api.github.com/users/flx42/followers","following_url":"https://api.github.com/users/flx42/following{/other_user}","gists_url":"https://api.github.com/users/flx42/gists{/gist_id}","starred_url":"https://api.github.com/users/flx42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flx42/subscriptions","organizations_url":"https://api.github.com/users/flx42/orgs","repos_url":"https://api.github.com/users/flx42/repos","events_url":"https://api.github.com/users/flx42/events{/privacy}","received_events_url":"https://api.github.com/users/flx42/received_events","type":"User","site_admin":false},"labels":[{"id":175375318,"node_id":"MDU6TGFiZWwxNzUzNzUzMTg=","url":"https://api.github.com/repos/moby/moby/labels/status/1-design-review","name":"status/1-design-review","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":{"login":"yongtang","id":6932348,"node_id":"MDQ6VXNlcjY5MzIzNDg=","avatar_url":"https://avatars0.githubusercontent.com/u/6932348?v=4","gravatar_id":"","url":"https://api.github.com/users/yongtang","html_url":"https://github.com/yongtang","followers_url":"https://api.github.com/users/yongtang/followers","following_url":"https://api.github.com/users/yongtang/following{/other_user}","gists_url":"https://api.github.com/users/yongtang/gists{/gist_id}","starred_url":"https://api.github.com/users/yongtang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yongtang/subscriptions","organizations_url":"https://api.github.com/users/yongtang/orgs","repos_url":"https://api.github.com/users/yongtang/repos","events_url":"https://api.github.com/users/yongtang/events{/privacy}","received_events_url":"https://api.github.com/users/yongtang/received_events","type":"User","site_admin":false},"assignees":[{"login":"yongtang","id":6932348,"node_id":"MDQ6VXNlcjY5MzIzNDg=","avatar_url":"https://avatars0.githubusercontent.com/u/6932348?v=4","gravatar_id":"","url":"https://api.github.com/users/yongtang","html_url":"https://github.com/yongtang","followers_url":"https://api.github.com/users/yongtang/followers","following_url":"https://api.github.com/users/yongtang/following{/other_user}","gists_url":"https://api.github.com/users/yongtang/gists{/gist_id}","starred_url":"https://api.github.com/users/yongtang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yongtang/subscriptions","organizations_url":"https://api.github.com/users/yongtang/orgs","repos_url":"https://api.github.com/users/yongtang/repos","events_url":"https://api.github.com/users/yongtang/events{/privacy}","received_events_url":"https://api.github.com/users/yongtang/received_events","type":"User","site_admin":false}],"milestone":null,"comments":16,"created_at":"2018-07-10T22:14:51Z","updated_at":"2018-12-22T09:55:00Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/moby/moby/pulls/37434","html_url":"https://github.com/moby/moby/pull/37434","diff_url":"https://github.com/moby/moby/pull/37434.diff","patch_url":"https://github.com/moby/moby/pull/37434.patch"},"body":"CLI discussion: https://github.com/docker/cli/issues/1200\r\n\r\nFirst draft of what the API might look like. I don't believe we need something more complex than that.\r\n\r\nDiscussion points\r\n* Since in the CLI discussion we agreed to namespace GPUs per vendor, naturally the entrypoint for the API is a map to access all the GPUs/options for a single vendor. We could have a single slice of GPUs and a single option map, but it feel awkward if a vendor needs to skip devices/options that it doesn't own.\r\n* Naming is hard, so `Resources` (plural) is all the GPUs from all vendor. `Resource` is all the GPUs from a **single** vendor. Thoughts?\r\n* Let's not support per-GPU options for now, but we can add that to the `GPU` struct later without breaking existing code.\r\n* In the CLI discussion we discussed a shortcut to select all GPUs: `--gpus nvidia`. However at this point it's not possible to get the actual list of GPU ids. We have two options: a) if `gpu.Resource.GPUs` is empty, then select all GPUs OR b) if `gpu.Resource.GPUs[0].ID == \"*\"` then select all GPUs.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/moby/moby/issues/comments/449559058","html_url":"https://github.com/moby/moby/pull/37434#issuecomment-449559058","issue_url":"https://api.github.com/repos/moby/moby/issues/37434","id":449559058,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTU1OTA1OA==","user":{"login":"codecov[bot]","id":22429695,"node_id":"MDM6Qm90MjI0Mjk2OTU=","avatar_url":"https://avatars2.githubusercontent.com/in/254?v=4","gravatar_id":"","url":"https://api.github.com/users/codecov%5Bbot%5D","html_url":"https://github.com/apps/codecov","followers_url":"https://api.github.com/users/codecov%5Bbot%5D/followers","following_url":"https://api.github.com/users/codecov%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/codecov%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/codecov%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codecov%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/codecov%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/codecov%5Bbot%5D/repos","events_url":"https://api.github.com/users/codecov%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/codecov%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-12-22T09:55:00Z","updated_at":"2018-12-22T09:55:00Z","author_association":"NONE","body":"# [Codecov](https://codecov.io/gh/moby/moby/pull/37434?src=pr&el=h1) Report\n> Merging [#37434](https://codecov.io/gh/moby/moby/pull/37434?src=pr&el=desc) into [master](https://codecov.io/gh/moby/moby/commit/25ec60d3cdc14a444f54b741a65ef5ef199844a2?src=pr&el=desc) will **increase** coverage by `0.46%`.\n> The diff coverage is `n/a`.\n\n\n\n```diff\n@@            Coverage Diff             @@\n##           master   #37434      +/-   ##\n==========================================\n+ Coverage   35.31%   35.78%   +0.46%     \n==========================================\n  Files         616      617       +1     \n  Lines       48851    51403    +2552     \n==========================================\n+ Hits        17254    18396    +1142     \n- Misses      29225    30422    +1197     \n- Partials     2372     2585     +213\n```\n\n"}}
{"actor":{"display_login":"codecov"}}