Skip to content

Commit 9dba538

Browse files
authored
Add GPU host requirement properties (devcontainers/spec#82)
1 parent 6eb07d0 commit 9dba538

File tree

2 files changed

+197
-0
lines changed

2 files changed

+197
-0
lines changed

extensions/configuration-editing/schemas/devContainer.schema.generated.json

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,39 @@
459459
"type": "string",
460460
"pattern": "^\\d+([tgmk]b)?$",
461461
"description": "Amount of required disk space in bytes. Supports units tb, gb, mb and kb."
462+
},
463+
"gpu": {
464+
"oneOf": [
465+
{
466+
"type": [
467+
"boolean",
468+
"string"
469+
],
470+
"enum": [
471+
true,
472+
false,
473+
"optional"
474+
],
475+
"description": "Indicates whether a GPU is required. The string \"optional\" indicates that a GPU is optional. An object value can be used to configure more detailed requirements."
476+
},
477+
{
478+
"type": "object",
479+
"properties": {
480+
"cores": {
481+
"type": "integer",
482+
"minimum": 1,
483+
"description": "Number of required cores."
484+
},
485+
"memory": {
486+
"type": "string",
487+
"pattern": "^\\d+([tgmk]b)?$",
488+
"description": "Amount of required RAM in bytes. Supports units tb, gb, mb and kb."
489+
}
490+
},
491+
"description": "Indicates whether a GPU is required. The string \"optional\" indicates that a GPU is optional. An object value can be used to configure more detailed requirements.",
492+
"additionalProperties": false
493+
}
494+
]
462495
}
463496
},
464497
"additionalProperties": false
@@ -1135,6 +1168,39 @@
11351168
"type": "string",
11361169
"pattern": "^\\d+([tgmk]b)?$",
11371170
"description": "Amount of required disk space in bytes. Supports units tb, gb, mb and kb."
1171+
},
1172+
"gpu": {
1173+
"oneOf": [
1174+
{
1175+
"type": [
1176+
"boolean",
1177+
"string"
1178+
],
1179+
"enum": [
1180+
true,
1181+
false,
1182+
"optional"
1183+
],
1184+
"description": "Indicates whether a GPU is required. The string \"optional\" indicates that a GPU is optional. An object value can be used to configure more detailed requirements."
1185+
},
1186+
{
1187+
"type": "object",
1188+
"properties": {
1189+
"cores": {
1190+
"type": "integer",
1191+
"minimum": 1,
1192+
"description": "Number of required cores."
1193+
},
1194+
"memory": {
1195+
"type": "string",
1196+
"pattern": "^\\d+([tgmk]b)?$",
1197+
"description": "Amount of required RAM in bytes. Supports units tb, gb, mb and kb."
1198+
}
1199+
},
1200+
"description": "Indicates whether a GPU is required. The string \"optional\" indicates that a GPU is optional. An object value can be used to configure more detailed requirements.",
1201+
"additionalProperties": false
1202+
}
1203+
]
11381204
}
11391205
},
11401206
"additionalProperties": false
@@ -1777,6 +1843,39 @@
17771843
"type": "string",
17781844
"pattern": "^\\d+([tgmk]b)?$",
17791845
"description": "Amount of required disk space in bytes. Supports units tb, gb, mb and kb."
1846+
},
1847+
"gpu": {
1848+
"oneOf": [
1849+
{
1850+
"type": [
1851+
"boolean",
1852+
"string"
1853+
],
1854+
"enum": [
1855+
true,
1856+
false,
1857+
"optional"
1858+
],
1859+
"description": "Indicates whether a GPU is required. The string \"optional\" indicates that a GPU is optional. An object value can be used to configure more detailed requirements."
1860+
},
1861+
{
1862+
"type": "object",
1863+
"properties": {
1864+
"cores": {
1865+
"type": "integer",
1866+
"minimum": 1,
1867+
"description": "Number of required cores."
1868+
},
1869+
"memory": {
1870+
"type": "string",
1871+
"pattern": "^\\d+([tgmk]b)?$",
1872+
"description": "Amount of required RAM in bytes. Supports units tb, gb, mb and kb."
1873+
}
1874+
},
1875+
"description": "Indicates whether a GPU is required. The string \"optional\" indicates that a GPU is optional. An object value can be used to configure more detailed requirements.",
1876+
"additionalProperties": false
1877+
}
1878+
]
17801879
}
17811880
},
17821881
"additionalProperties": false
@@ -2411,6 +2510,39 @@
24112510
"type": "string",
24122511
"pattern": "^\\d+([tgmk]b)?$",
24132512
"description": "Amount of required disk space in bytes. Supports units tb, gb, mb and kb."
2513+
},
2514+
"gpu": {
2515+
"oneOf": [
2516+
{
2517+
"type": [
2518+
"boolean",
2519+
"string"
2520+
],
2521+
"enum": [
2522+
true,
2523+
false,
2524+
"optional"
2525+
],
2526+
"description": "Indicates whether a GPU is required. The string \"optional\" indicates that a GPU is optional. An object value can be used to configure more detailed requirements."
2527+
},
2528+
{
2529+
"type": "object",
2530+
"properties": {
2531+
"cores": {
2532+
"type": "integer",
2533+
"minimum": 1,
2534+
"description": "Number of required cores."
2535+
},
2536+
"memory": {
2537+
"type": "string",
2538+
"pattern": "^\\d+([tgmk]b)?$",
2539+
"description": "Amount of required RAM in bytes. Supports units tb, gb, mb and kb."
2540+
}
2541+
},
2542+
"description": "Indicates whether a GPU is required. The string \"optional\" indicates that a GPU is optional. An object value can be used to configure more detailed requirements.",
2543+
"additionalProperties": false
2544+
}
2545+
]
24142546
}
24152547
},
24162548
"additionalProperties": false
@@ -3010,6 +3142,39 @@
30103142
"type": "string",
30113143
"pattern": "^\\d+([tgmk]b)?$",
30123144
"description": "Amount of required disk space in bytes. Supports units tb, gb, mb and kb."
3145+
},
3146+
"gpu": {
3147+
"oneOf": [
3148+
{
3149+
"type": [
3150+
"boolean",
3151+
"string"
3152+
],
3153+
"enum": [
3154+
true,
3155+
false,
3156+
"optional"
3157+
],
3158+
"description": "Indicates whether a GPU is required. The string \"optional\" indicates that a GPU is optional. An object value can be used to configure more detailed requirements."
3159+
},
3160+
{
3161+
"type": "object",
3162+
"properties": {
3163+
"cores": {
3164+
"type": "integer",
3165+
"minimum": 1,
3166+
"description": "Number of required cores."
3167+
},
3168+
"memory": {
3169+
"type": "string",
3170+
"pattern": "^\\d+([tgmk]b)?$",
3171+
"description": "Amount of required RAM in bytes. Supports units tb, gb, mb and kb."
3172+
}
3173+
},
3174+
"description": "Indicates whether a GPU is required. The string \"optional\" indicates that a GPU is optional. An object value can be used to configure more detailed requirements.",
3175+
"additionalProperties": false
3176+
}
3177+
]
30133178
}
30143179
},
30153180
"additionalProperties": false

extensions/configuration-editing/schemas/devContainer.schema.src.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,38 @@
351351
"type": "string",
352352
"pattern": "^\\d+([tgmk]b)?$",
353353
"description": "Amount of required disk space in bytes. Supports units tb, gb, mb and kb."
354+
},
355+
"gpu": {
356+
"oneOf": [
357+
{
358+
"type": [
359+
"boolean",
360+
"string"
361+
],
362+
"enum": [
363+
true,
364+
false,
365+
"optional"
366+
],
367+
"description": "Indicates whether a GPU is required. The string \"optional\" indicates that a GPU is optional. An object value can be used to configure more detailed requirements."
368+
},
369+
{
370+
"type": "object",
371+
"properties": {
372+
"cores": {
373+
"type": "integer",
374+
"minimum": 1,
375+
"description": "Number of required cores."
376+
},
377+
"memory": {
378+
"type": "string",
379+
"pattern": "^\\d+([tgmk]b)?$",
380+
"description": "Amount of required RAM in bytes. Supports units tb, gb, mb and kb."
381+
}
382+
},
383+
"description": "Indicates whether a GPU is required. The string \"optional\" indicates that a GPU is optional. An object value can be used to configure more detailed requirements."
384+
}
385+
]
354386
}
355387
}
356388
}

0 commit comments

Comments
 (0)