LabOptions#

pydantic model controller.models.v1.lab.LabOptions#

Options for the lab, specified at creation time.

This model represents the configuration information about a running lab returned by a JSON API query. It shares many attributes in common with the input model, LabRequestOptions, but reduces the requested image to a Docker image reference and doesn’t support the complex validation required by LabRequestOptions.

Parameters:

data (Any) –

Show JSON schema
{
   "title": "LabOptions",
   "description": "Options for the lab, specified at creation time.\n\nThis model represents the configuration information about a running lab\nreturned by a JSON API query. It shares many attributes in common with the\ninput model, `LabRequestOptions`, but reduces the requested image to a\nDocker image reference and doesn't support the complex validation required\nby `LabRequestOptions`.",
   "type": "object",
   "properties": {
      "size": {
         "allOf": [
            {
               "$ref": "#/$defs/LabSize"
            }
         ],
         "description": "Size of image, chosen from sizes specified in the controller configuration",
         "examples": [
            "medium"
         ],
         "title": "Image size"
      },
      "enable_debug": {
         "default": false,
         "description": "If true, set the ``DEBUG`` environment variable when spawning the lab, which enables additional debug logging",
         "examples": [
            true
         ],
         "title": "Enable debugging in spawned Lab",
         "type": "boolean"
      },
      "reset_user_env": {
         "default": false,
         "description": "If true, set the ``RESET_USER_ENV`` environment variable when spawning the lab, which tells the lab to move aside the user environment directories (``.cache``, ``.conda``, ``.jupyter``, ``.local``) and files (``.user_setups``). This can be used to recover from user configuration errors that break lab startup.",
         "examples": [
            true
         ],
         "title": "Move aside user environment",
         "type": "boolean"
      },
      "image": {
         "description": "Docker reference to image used by the lab",
         "examples": [
            "lighthouse.ceres/library/sketchbook:w_2023_07@sha256:abcd"
         ],
         "title": "Lab image",
         "type": "string"
      }
   },
   "$defs": {
      "LabSize": {
         "description": "Allowable names for pod sizes.\n\nTaken from `d20 creature sizes`_.",
         "enum": [
            "fine",
            "diminutive",
            "tiny",
            "small",
            "medium",
            "large",
            "huge",
            "gargantuan",
            "colossal",
            "custom"
         ],
         "title": "LabSize",
         "type": "string"
      }
   },
   "required": [
      "size",
      "image"
   ]
}

Fields:
field enable_debug: bool = False#

If true, set the DEBUG environment variable when spawning the lab, which enables additional debug logging

field image: str [Required]#

Docker reference to image used by the lab

field reset_user_env: bool = False#

If true, set the RESET_USER_ENV environment variable when spawning the lab, which tells the lab to move aside the user environment directories (.cache, .conda, .jupyter, .local) and files (.user_setups). This can be used to recover from user configuration errors that break lab startup.

field size: LabSize [Required]#

Size of image, chosen from sizes specified in the controller configuration