containers / podman-desktop-extension-ai-lab

Work with LLMs on a local environment using containers

Home Page:https://podman-desktop.io/extensions/ai-lab

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stop using pulling update for Inference server health

axel7083 opened this issue · comments

We are currently using a pulling update mechanism to get the health check.

const intervalId = setInterval(this.updateServerStatus.bind(this, engineId, containerId), 10000);

We should move away from this behavior as it makes our extension use more resources when we already have access to this information through the podman desktop api events:

image

We already have some code able to capture container events.

case 'die':
this.updateServerStatus(engineId, containerId);
clearInterval(intervalId);
break;

The migration would be relatively easy and simplify the code for InferenceManager.

In the new Podman 5.1.0 version, they introduced a new healthcheck_events allowing to remove the health events.

A new field, healthcheck_events, has been added to containers.conf under the [engine] section to allow users to disable the generation of health_status events to avoid spamming logs on systems with many healthchecks.1

When we will start using those events, we would have to check that the config does not have this, otherwise healthcheck could not be verified.

Footnotes

  1. https://github.com/containers/podman/releases/tag/v5.1.0