Add DEPLOY.md: Linux server deployment guide

Document deploying the FastAPI service to a Linux server end to end: venv +
CPU-only torch (avoid the CUDA build), opencv-python-headless, the two weight
layouts (HF cache offline vs local models/ folders) with the mirror/proxy/Xet
download workaround, environment variables, uvicorn --workers 1, a systemd unit,
verification, remote exposure, capacity notes, and a troubleshooting table.
Link to it from README.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-03 03:12:42 +00:00
parent da4164e95a
commit 8a7ad60705
2 changed files with 243 additions and 0 deletions
+2
View File
@@ -131,6 +131,8 @@ metadata.json
An HTTP wrapper (`app.py` + `bgfilter/service.py`) exposes the pipeline as a
long-running FastAPI service. Models load once and are reused across requests.
For deploying to a Linux server (dependencies, weights, systemd, offline mode), see
[DEPLOY.md](DEPLOY.md).
```powershell
D:\MiniConda\envs\lightML\python.exe -m uvicorn app:app `