Pin Applio 3.6.5 and verified basis assets, migrate private voice provenance, and coordinate conversion/live/training with Deck GPU leases. Prepare an inactive voice profile and a restricted studio container. Move CUDA and Torch caches out of the small temporary filesystem to prevent OmniVoice reference failures. Package app updates from the explicit allowlist in one Docker layer.
35 lines
900 B
Python
35 lines
900 B
Python
"""Runner interface for Applio job execution."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import abc
|
|
import threading
|
|
|
|
from ..jobs.models import Job
|
|
|
|
|
|
class Runner(abc.ABC):
|
|
"""Abstract base for job runners."""
|
|
|
|
@abc.abstractmethod
|
|
def execute(self, job: Job, cancel_event: threading.Event) -> None:
|
|
"""Execute the job. Must update job status/phase/log as it progresses.
|
|
|
|
The runner is responsible for:
|
|
- Setting phases and progress
|
|
- Checking cancel_event periodically
|
|
- Marking the job as success/failed/cancelled
|
|
- Verifying expected output artifacts exist before marking success
|
|
"""
|
|
...
|
|
|
|
@abc.abstractmethod
|
|
def name(self) -> str:
|
|
"""Human-readable runner name."""
|
|
...
|
|
|
|
@abc.abstractmethod
|
|
def is_available(self) -> bool:
|
|
"""Check if the runner's backend is reachable."""
|
|
...
|