refactor: collapse Config proxy, migrate tracker to SQLite, split reconcile module
- Config: remove _ConfigAccessor and ConfigManager; use __getattr__ for lazy loading on single _Config class; re-register self as _instance in __getattr__ so reset() always clears the correct object (item 1) - upload_tracker: replace hand-rolled JSON store with sqlite3; auto-migrates existing JSON on first run; remove dead record_frigate_file function; connection re-opens when CACHE_DIR changes for test isolation (items 2, 8) - diversity: move ThreadPoolExecutor import to module level; inject optional fetch_fn parameter for testability (items 3, 6) - pyproject: consolidate 4 variant files into extras (gpu/rocm/intel/cpu); update Dockerfile to use --extra flag; delete variant pyproject/lock files; uv.lock needs regen with `uv lock` after this change (item 4) - jobs: extract _build_job helper to separate business logic from terminal I/O; auto_configure delegates dedup/selection to _build_job (item 5) - logging: convert f-string log calls to % interpolation throughout all winnow/ modules (item 7) - reconcile: new module with reconcile_frigate_mappings and enrich_asset_with_face_data extracted from executor.py (item 9) - scheduler: print next scheduled run time after startup and after each run; fix f-string logger.error call (item 10)
This commit is contained in:
+7
-8
@@ -41,18 +41,17 @@ RUN curl -LsSf https://astral.sh/uv/install.sh | sh \
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Swap in the variant-specific pyproject and lockfile before syncing.
|
||||
COPY pyproject.toml uv.lock pyproject-cpu.toml uv-cpu.lock \
|
||||
pyproject-rocm.toml uv-rocm.lock pyproject-intel.toml uv-intel.lock ./
|
||||
COPY pyproject.toml uv.lock ./
|
||||
RUN if [ "$VARIANT" = "cpu" ]; then \
|
||||
cp pyproject-cpu.toml pyproject.toml && cp uv-cpu.lock uv.lock; \
|
||||
uv sync --frozen --no-dev --extra cpu; \
|
||||
elif [ "$VARIANT" = "rocm" ]; then \
|
||||
cp pyproject-rocm.toml pyproject.toml && cp uv-rocm.lock uv.lock; \
|
||||
uv sync --frozen --no-dev --extra rocm; \
|
||||
elif [ "$VARIANT" = "intel" ]; then \
|
||||
cp pyproject-intel.toml pyproject.toml && cp uv-intel.lock uv.lock; \
|
||||
uv sync --frozen --no-dev --extra intel; \
|
||||
else \
|
||||
uv sync --frozen --no-dev --extra gpu; \
|
||||
fi && \
|
||||
uv sync --frozen --no-dev \
|
||||
&& uv cache clean
|
||||
uv cache clean
|
||||
|
||||
COPY winnow/ winnow/
|
||||
COPY entrypoint.sh scheduler.py ./
|
||||
|
||||
Reference in New Issue
Block a user