mirror of
https://github.com/frappe/gunicorn.git
synced 2026-07-03 03:01:31 +08:00
Add a complete example demonstrating dirty workers with sentence-transformers for text embeddings via FastAPI: - EmbeddingApp DirtyApp that loads and manages the ML model - FastAPI endpoints for /embed and /health - Docker and docker-compose configuration - Integration tests with numpy similarity checks - GitHub Actions CI workflow
9 lines
178 B
Python
9 lines
178 B
Python
bind = "0.0.0.0:8000"
|
|
workers = 2
|
|
worker_class = "asgi"
|
|
|
|
# Dirty worker config
|
|
dirty_apps = ["embedding_service.embedding_app:EmbeddingApp"]
|
|
dirty_workers = 1
|
|
dirty_timeout = 60
|