Skip to content

armgit / ODS

Public Imported from GitHub
0

ODS V3 Pre-Release: Public testing and refinement ahead of the official V3 launch. Turn your PC, Mac, or Linux box into a private AI server.

2.9 KB
Raw Blame
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://osmantic.com/pixel/schemas/work-data-runtime-v1.schema.json",
  "title": "Pixel local Data Lab runtime v1",
  "type": "object",
  "additionalProperties": false,
  "required": ["$schema", "schemaVersion", "contract", "platform", "engines", "artifacts", "systemPackages"],
  "properties": {
    "$schema": {"const": "https://osmantic.com/pixel/schemas/work-data-runtime-v1.schema.json"},
    "schemaVersion": {"const": 1},
    "contract": {"const": "pixel-local-data-runtime-v1"},
    "platform": {"const": "linux-x86_64"},
    "engines": {
      "type": "object",
      "additionalProperties": false,
      "required": ["duckdb", "polars", "python", "sqlite"],
      "properties": {
        "duckdb": {"$ref": "#/$defs/pythonEngine"},
        "polars": {"$ref": "#/$defs/pythonEngine"},
        "python": {"$ref": "#/$defs/pythonEngine"},
        "sqlite": {"$ref": "#/$defs/sqliteEngine"}
      }
    },
    "artifacts": {
      "type": "array",
      "minItems": 3,
      "maxItems": 3,
      "items": {"$ref": "#/$defs/artifact"}
    },
    "systemPackages": {
      "type": "array",
      "minItems": 2,
      "maxItems": 2,
      "items": {"$ref": "#/$defs/systemPackage"}
    }
  },
  "$defs": {
    "version": {"type": "string", "pattern": "^(?:0|[1-9][0-9]{0,8})\\.(?:0|[1-9][0-9]{0,8})\\.(?:0|[1-9][0-9]{0,8})(?:\\.post[0-9]+)?$"},
    "pythonEngine": {
      "type": "object",
      "additionalProperties": false,
      "required": ["version", "entrypoint"],
      "properties": {"version": {"$ref": "#/$defs/version"}, "entrypoint": {"const": "/usr/bin/python3"}}
    },
    "sqliteEngine": {
      "type": "object",
      "additionalProperties": false,
      "required": ["version", "entrypoint"],
      "properties": {"version": {"$ref": "#/$defs/version"}, "entrypoint": {"const": "/usr/bin/sqlite3"}}
    },
    "artifact": {
      "type": "object",
      "additionalProperties": false,
      "required": ["name", "version", "filename", "sha256", "bytes", "url", "license"],
      "properties": {
        "name": {"enum": ["duckdb", "polars", "polars-runtime-32"]},
        "version": {"$ref": "#/$defs/version"},
        "filename": {"type": "string", "pattern": "^[A-Za-z0-9._-]{1,255}\\.whl$"},
        "sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
        "bytes": {"type": "integer", "minimum": 1, "maximum": 1073741824},
        "url": {"type": "string", "pattern": "^https://files\\.pythonhosted\\.org/packages/[a-f0-9]{2}/[a-f0-9]{2}/[A-Za-z0-9._/-]{1,1000}\\.whl$"},
        "license": {"const": "MIT"}
      }
    },
    "systemPackage": {
      "type": "object",
      "additionalProperties": false,
      "required": ["name", "version"],
      "properties": {
        "name": {"enum": ["python3", "sqlite3"]},
        "version": {"type": "string", "pattern": "^[A-Za-z0-9.+:~_-]{1,100}$"}
      }
    }
  }
}