From c1a8f26a7d208dd824fa6584c6bf9d5f72e7c32f Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Mon, 28 Nov 2022 16:41:18 +0100 Subject: [PATCH] Add GPU host requirement properties (devcontainers/spec#82) --- schemas/devContainer.base.schema.json | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/schemas/devContainer.base.schema.json b/schemas/devContainer.base.schema.json index b9ba9a0..4774ba8 100644 --- a/schemas/devContainer.base.schema.json +++ b/schemas/devContainer.base.schema.json @@ -379,6 +379,39 @@ "type": "string", "pattern": "^\\d+([tgmk]b)?$", "description": "Amount of required disk space in bytes. Supports units tb, gb, mb and kb." + }, + "gpu": { + "oneOf": [ + { + "type": [ + "boolean", + "string" + ], + "enum": [ + true, + false, + "optional" + ], + "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." + }, + { + "type": "object", + "properties": { + "cores": { + "type": "integer", + "minimum": 1, + "description": "Number of required cores." + }, + "memory": { + "type": "string", + "pattern": "^\\d+([tgmk]b)?$", + "description": "Amount of required RAM in bytes. Supports units tb, gb, mb and kb." + } + }, + "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.", + "additionalProperties": false + } + ] } } }