Add dev infrastructure improvements
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions

- Central config with logging on startup
- Hot reload support for GPU worker (docker-compose.gpu-dev.yml)
- Quick deploy script (scripts/gpu-dev-deploy.sh)
- GPU/CPU frame compatibility tests
- CI/CD pipeline for GPU worker (.gitea/workflows/gpu-worker.yml)
- Standardize GPU_PERSIST default to 0 across all modules

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-03 21:56:40 +00:00
parent 6ea39d633b
commit fe6730ce72
9 changed files with 383 additions and 6 deletions

View File

@@ -6,17 +6,32 @@ Uses S-expression recipes with frame-by-frame processing.
"""
import os
import sys
from celery import Celery
from celery.signals import worker_ready
REDIS_URL = os.environ.get('REDIS_URL', 'redis://localhost:6379/5')
# Use central config
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from app.config import settings
app = Celery(
'art_celery',
broker=REDIS_URL,
backend=REDIS_URL,
broker=settings.redis_url,
backend=settings.redis_url,
include=['tasks', 'tasks.streaming', 'tasks.ipfs_upload']
)
@worker_ready.connect
def log_config_on_startup(sender, **kwargs):
"""Log configuration when worker starts."""
print("=" * 60, file=sys.stderr)
print("WORKER STARTED - CONFIGURATION", file=sys.stderr)
print("=" * 60, file=sys.stderr)
settings.log_config()
print(f"Worker: {sender}", file=sys.stderr)
print("=" * 60, file=sys.stderr)
app.conf.update(
result_expires=86400 * 7, # 7 days - allow time for recovery after restarts
task_serializer='json',