Commit 2c54589
authored
feat(cli): add GPU count requests (#1812)
* feat(gpu)!: add resource requirements
BREAKING CHANGE: SandboxSpec.gpu and DriverSandboxSpec.gpu were replaced with resource_requirements.gpu, changing protobuf field 9 from a bool to a message for both public and driver APIs.
Signed-off-by: Evan Lezar <elezar@nvidia.com>
* refactor(gpu): pass requirements through sandbox create
Pass the coupled GPU requirement object through the CLI sandbox_create boundary instead of splitting presence and count into separate arguments.
Signed-off-by: Evan Lezar <elezar@nvidia.com>
* refactor(gpu): pass requirements to timeout message
Pass ResourceRequirements into the provisioning timeout message helper so GPU hints are derived from the same nested request object used to create the sandbox.
Signed-off-by: Evan Lezar <elezar@nvidia.com>
* refactor(gpu): pass driver requirements through helpers
Thread Option<GpuResourceRequirements> through driver validation and rendering helpers instead of splitting GPU presence and count into separate arguments.
Signed-off-by: Evan Lezar <elezar@nvidia.com>
* fix(gpu): validate exact device requests
Require exact driver GPU device lists to be tied to a GPU request, allow a single exact device to use the default countless request, and require explicit matching counts for multi-device lists.
Signed-off-by: Evan Lezar <elezar@nvidia.com>
---------
Signed-off-by: Evan Lezar <elezar@nvidia.com>1 parent 8e831f3 commit 2c54589
22 files changed
Lines changed: 2035 additions & 618 deletions
File tree
- architecture
- crates
- openshell-cli
- src
- tests
- openshell-core/src
- openshell-driver-docker
- src
- openshell-driver-kubernetes
- src
- openshell-driver-podman
- src
- openshell-driver-vm/src
- openshell-server/src
- compute
- grpc
- docs
- reference
- sandboxes
- proto
- rfc/0004-sandbox-resource-requirements
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
63 | 61 | | |
64 | 62 | | |
65 | 63 | | |
| |||
98 | 96 | | |
99 | 97 | | |
100 | 98 | | |
101 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
31 | 47 | | |
32 | 48 | | |
33 | 49 | | |
| |||
109 | 125 | | |
110 | 126 | | |
111 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
112 | 143 | | |
113 | 144 | | |
114 | 145 | | |
| |||
1227 | 1258 | | |
1228 | 1259 | | |
1229 | 1260 | | |
1230 | | - | |
1231 | | - | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
1232 | 1266 | | |
1233 | 1267 | | |
1234 | 1268 | | |
| |||
2636 | 2670 | | |
2637 | 2671 | | |
2638 | 2672 | | |
| 2673 | + | |
2639 | 2674 | | |
2640 | 2675 | | |
2641 | 2676 | | |
| |||
2648 | 2683 | | |
2649 | 2684 | | |
2650 | 2685 | | |
2651 | | - | |
| 2686 | + | |
2652 | 2687 | | |
2653 | 2688 | | |
2654 | 2689 | | |
| |||
3648 | 3683 | | |
3649 | 3684 | | |
3650 | 3685 | | |
| 3686 | + | |
| 3687 | + | |
| 3688 | + | |
| 3689 | + | |
| 3690 | + | |
| 3691 | + | |
| 3692 | + | |
| 3693 | + | |
| 3694 | + | |
| 3695 | + | |
| 3696 | + | |
| 3697 | + | |
| 3698 | + | |
| 3699 | + | |
| 3700 | + | |
| 3701 | + | |
| 3702 | + | |
| 3703 | + | |
| 3704 | + | |
| 3705 | + | |
| 3706 | + | |
3651 | 3707 | | |
3652 | 3708 | | |
3653 | 3709 | | |
| |||
4529 | 4585 | | |
4530 | 4586 | | |
4531 | 4587 | | |
| 4588 | + | |
| 4589 | + | |
| 4590 | + | |
| 4591 | + | |
| 4592 | + | |
| 4593 | + | |
| 4594 | + | |
| 4595 | + | |
| 4596 | + | |
| 4597 | + | |
| 4598 | + | |
| 4599 | + | |
| 4600 | + | |
| 4601 | + | |
| 4602 | + | |
| 4603 | + | |
| 4604 | + | |
| 4605 | + | |
| 4606 | + | |
| 4607 | + | |
| 4608 | + | |
| 4609 | + | |
| 4610 | + | |
| 4611 | + | |
| 4612 | + | |
| 4613 | + | |
| 4614 | + | |
| 4615 | + | |
| 4616 | + | |
| 4617 | + | |
| 4618 | + | |
| 4619 | + | |
| 4620 | + | |
| 4621 | + | |
| 4622 | + | |
| 4623 | + | |
| 4624 | + | |
| 4625 | + | |
| 4626 | + | |
| 4627 | + | |
| 4628 | + | |
| 4629 | + | |
| 4630 | + | |
| 4631 | + | |
| 4632 | + | |
| 4633 | + | |
| 4634 | + | |
| 4635 | + | |
| 4636 | + | |
| 4637 | + | |
| 4638 | + | |
| 4639 | + | |
| 4640 | + | |
| 4641 | + | |
| 4642 | + | |
| 4643 | + | |
| 4644 | + | |
| 4645 | + | |
| 4646 | + | |
| 4647 | + | |
| 4648 | + | |
| 4649 | + | |
| 4650 | + | |
| 4651 | + | |
| 4652 | + | |
| 4653 | + | |
| 4654 | + | |
| 4655 | + | |
| 4656 | + | |
| 4657 | + | |
| 4658 | + | |
| 4659 | + | |
| 4660 | + | |
| 4661 | + | |
| 4662 | + | |
| 4663 | + | |
| 4664 | + | |
| 4665 | + | |
| 4666 | + | |
| 4667 | + | |
| 4668 | + | |
| 4669 | + | |
| 4670 | + | |
| 4671 | + | |
| 4672 | + | |
| 4673 | + | |
| 4674 | + | |
| 4675 | + | |
| 4676 | + | |
| 4677 | + | |
| 4678 | + | |
| 4679 | + | |
| 4680 | + | |
| 4681 | + | |
| 4682 | + | |
| 4683 | + | |
| 4684 | + | |
| 4685 | + | |
| 4686 | + | |
| 4687 | + | |
| 4688 | + | |
| 4689 | + | |
| 4690 | + | |
| 4691 | + | |
| 4692 | + | |
| 4693 | + | |
| 4694 | + | |
4532 | 4695 | | |
4533 | 4696 | | |
4534 | 4697 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
126 | | - | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| |||
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
136 | | - | |
| 137 | + | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| |||
1753 | 1754 | | |
1754 | 1755 | | |
1755 | 1756 | | |
1756 | | - | |
| 1757 | + | |
1757 | 1758 | | |
1758 | 1759 | | |
1759 | 1760 | | |
| |||
1809 | 1810 | | |
1810 | 1811 | | |
1811 | 1812 | | |
1812 | | - | |
1813 | | - | |
1814 | 1813 | | |
1815 | 1814 | | |
1816 | 1815 | | |
| |||
1842 | 1841 | | |
1843 | 1842 | | |
1844 | 1843 | | |
| 1844 | + | |
| 1845 | + | |
1845 | 1846 | | |
1846 | 1847 | | |
1847 | | - | |
| 1848 | + | |
1848 | 1849 | | |
1849 | 1850 | | |
1850 | 1851 | | |
| |||
1989 | 1990 | | |
1990 | 1991 | | |
1991 | 1992 | | |
1992 | | - | |
| 1993 | + | |
1993 | 1994 | | |
1994 | 1995 | | |
1995 | 1996 | | |
| |||
2008 | 2009 | | |
2009 | 2010 | | |
2010 | 2011 | | |
2011 | | - | |
| 2012 | + | |
2012 | 2013 | | |
2013 | 2014 | | |
2014 | 2015 | | |
| |||
7776 | 7777 | | |
7777 | 7778 | | |
7778 | 7779 | | |
7779 | | - | |
7780 | | - | |
7781 | | - | |
| 7780 | + | |
| 7781 | + | |
| 7782 | + | |
| 7783 | + | |
7782 | 7784 | | |
7783 | 7785 | | |
7784 | 7786 | | |
| |||
8482 | 8484 | | |
8483 | 8485 | | |
8484 | 8486 | | |
| 8487 | + | |
| 8488 | + | |
| 8489 | + | |
8485 | 8490 | | |
8486 | 8491 | | |
8487 | | - | |
| 8492 | + | |
8488 | 8493 | | |
8489 | 8494 | | |
8490 | 8495 | | |
| |||
8495 | 8500 | | |
8496 | 8501 | | |
8497 | 8502 | | |
8498 | | - | |
| 8503 | + | |
| 8504 | + | |
| 8505 | + | |
| 8506 | + | |
| 8507 | + | |
| 8508 | + | |
| 8509 | + | |
| 8510 | + | |
| 8511 | + | |
8499 | 8512 | | |
8500 | 8513 | | |
8501 | 8514 | | |
| |||
0 commit comments