{"id":27933317,"url":"https://github.com/groundlight/edge-endpoint","last_synced_at":"2025-05-07T04:58:09.300Z","repository":{"id":257976233,"uuid":"579473762","full_name":"groundlight/edge-endpoint","owner":"groundlight","description":"Run your Groundlight models on-prem with an Edge Endpoint","archived":false,"fork":false,"pushed_at":"2025-05-07T03:08:48.000Z","size":3875,"stargazers_count":7,"open_issues_count":10,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-07T04:58:04.579Z","etag":null,"topics":["edge-ai","edge-computing","edge-detection","edge-proxy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/groundlight.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-12-17T20:15:26.000Z","updated_at":"2025-05-07T03:08:50.000Z","dependencies_parsed_at":"2025-05-06T21:31:59.253Z","dependency_job_id":"80bcf30c-2712-441e-8e9b-360fc20767a5","html_url":"https://github.com/groundlight/edge-endpoint","commit_stats":null,"previous_names":["groundlight/edge-endpoint"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/groundlight%2Fedge-endpoint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/groundlight%2Fedge-endpoint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/groundlight%2Fedge-endpoint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/groundlight%2Fedge-endpoint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/groundlight","download_url":"https://codeload.github.com/groundlight/edge-endpoint/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252816964,"owners_count":21808704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["edge-ai","edge-computing","edge-detection","edge-proxy"],"created_at":"2025-05-07T04:58:08.751Z","updated_at":"2025-05-07T04:58:09.285Z","avatar_url":"https://github.com/groundlight.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Groundlight Edge Endpoint\n\n(For instructions on running on Balena, see [here](./deploy/balena-k3s/README.md))\n\nRun your Groundlight models on-prem by hosting an Edge Endpoint on your own hardware.  The Edge Endpoint exposes the exact same API as the Groundlight cloud service, so any Groundlight application can point to the Edge Endpoint simply by configuring the `GROUNDLIGHT_ENDPOINT` environment variable as follows:\n\n```bash\nexport GROUNDLIGHT_ENDPOINT=http://localhost:30101\n# This assumes your Groundlight SDK application is running on the same host as the Edge Endpoint.\n```\n\nThe Edge Endpoint will attempt to answer image queries using local models for your detectors.  If it can do so confidently, you get faster and cheaper responses. If it can't, it will escalate the image queries to the cloud for further analysis.\n\n## Running the Edge Endpoint\n\nTo set up the Edge Endpoint, please refer to the [deploy README](deploy/README.md).\n\n### Configuring detectors for the Edge Endpoint\n\nWhile not required, configuring detectors provides fine-grained control over the behavior of specific detectors on the edge. Please refer to [the guide to configuring detectors](/CONFIGURING-DETECTORS.md) for more information.\n\n### Using the Edge Endpoint with your Groundlight application.\n\nAny application written with the [Groundlight SDK](https://pypi.org/project/groundlight/) can work with an Edge Endpoint without any code changes.  Simply set an environment variable with the URL of your Edge Endpoint like:\n\n```bash\nexport GROUNDLIGHT_ENDPOINT=http://localhost:30101\n```\n\nTo find the correct port, run `kubectl get services` and you should see an entry like this:\n```\nNAME                                                        TYPE       CLUSTER-IP      EXTERNAL-IP   PORT(S)                         AGE\nservice/edge-endpoint-service                               NodePort   10.43.141.253   \u003cnone\u003e        30101:30101/TCP                 23m\n```\n\nThe port is the second number listed under ports for the `edge-endpoint-service` (in this case, 30101).\n\nIf you'd like more control, you can also initialize the `Groundlight` SDK object with the endpoint explicitly like this:\n\n```python\nfrom groundlight import Groundlight\n\ngl = Groundlight(endpoint=\"http://localhost:30101\")\n\ndet = gl.get_or_create_detector(name=\"doorway\", query=\"Is the doorway open?\")\nimg = \"./docs/static/img/doorway.jpg\"\nwith open(img, \"rb\") as img_file:\n    byte_stream = img_file.read()\n\nimage_query = gl.submit_image_query(detector=det, image=byte_stream)\nprint(f\"The answer is {image_query.result}\")\n```\n\nSee the [SDK's getting started guide](https://code.groundlight.ai/python-sdk/docs/getting-started) for more info about using the Groundlight SDK.\n\n## Development and Internal Architecture\n\nThis section describes the various components that comprise the Groundlight Edge Endpoint, and how they interoperate.\nThis might be useful for tuning operational aspects of your endpoint, contributing to the project, or debugging problems.\n\n### Components and terms\n\nInside the edge-endpoint pod there are two containers: one for the edge logic and another one for creating/updating inference deployments.\n\n* `edge-endpoint` container: This container handles the edge logic.\n* `inference-model-updater` container: This container checks for changes to the models being used for edge inference and updates them when new versions are available.\n* `status-monitor` container: This container serves the status page, and reports metrics to the cloud.\n\nEach detector will have 2 inferencemodel pods, one for the primary model and one for the out of domain detection (OODD) model.\nEach inferencemodel pod contains one container.\n\n* `inference-server container`: This container holds the edge model\n\n* `Cloud API:` This is the upstream API that we use as a fallback in case the edge logic server encounters problems. It is set to `https://api.groundlight.ai`.\n\n* `Endpoint url:` This is the URL where the endpoint's functionality is exposed to the SDK or applications.  (i.e., the upstream you can set for the Groundlight application). This is set to `http://localhost:30101`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgroundlight%2Fedge-endpoint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgroundlight%2Fedge-endpoint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgroundlight%2Fedge-endpoint/lists"}