feat(laya): integrate HTTP ranking service
Add the pinned Laya HTTP ranker and production composition, configure the CPU Compose service and cache, and document operations. Cover protocol validation, generation orchestration, sanitized logging, and Compose wiring. Refs #17 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -31,7 +31,9 @@ services:
|
||||
- "3001"
|
||||
|
||||
backend:
|
||||
image: gitea.anthonybouteiller.ovh/blomios/tradarr-backend:v1.1.0
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
stop_grace_period: 5m
|
||||
depends_on:
|
||||
@ -39,12 +41,17 @@ services:
|
||||
condition: service_healthy
|
||||
scraper:
|
||||
condition: service_started
|
||||
laya:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
DATABASE_URL: "host=postgres port=5432 user=${POSTGRES_USER:-tradarr} password=${POSTGRES_PASSWORD} dbname=${POSTGRES_DB:-tradarr} sslmode=disable"
|
||||
JWT_SECRET: ${JWT_SECRET:?JWT_SECRET is required}
|
||||
ENCRYPTION_KEY: ${ENCRYPTION_KEY:?ENCRYPTION_KEY must be 32 bytes hex}
|
||||
PORT: "8080"
|
||||
SCRAPER_URL: "http://scraper:3001"
|
||||
LAYA_URL: "http://laya:8000"
|
||||
LAYA_TIMEOUT: ${LAYA_TIMEOUT:-120s}
|
||||
LAYA_API_KEY: ${LAYA_API_KEY:-}
|
||||
OPENFIGI_API_KEY: ${OPENFIGI_API_KEY:-}
|
||||
OPENFIGI_TIMEOUT: ${OPENFIGI_TIMEOUT:-5s}
|
||||
ADMIN_EMAIL: ${ADMIN_EMAIL:-admin@tradarr.local}
|
||||
@ -54,7 +61,38 @@ services:
|
||||
expose:
|
||||
- "8080"
|
||||
|
||||
laya:
|
||||
image: tradarr-laya:v0.5.2-cpu
|
||||
pull_policy: build
|
||||
build:
|
||||
# Official v0.5.2 annotated tag dereferenced to its immutable commit.
|
||||
context: https://github.com/NandhaKishorM/laya.git#e150aa92a0d4059ac621875b39b620847cf1b88a
|
||||
args:
|
||||
TORCH_INDEX: cpu
|
||||
command: ["laya-serve"]
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
LAYA_THREADS: ${LAYA_THREADS:-4}
|
||||
LAYA_DEVICE: "cpu"
|
||||
LAYA_MODELS: "multilingual"
|
||||
LAYA_PRELOAD: "1"
|
||||
LAYA_REVISION: "reviewed"
|
||||
LAYA_JEV_STRICT: "0"
|
||||
LAYA_API_KEY: ${LAYA_API_KEY:-}
|
||||
HF_HOME: "/home/laya/.cache/huggingface"
|
||||
volumes:
|
||||
- laya_model_cache:/home/laya/.cache/huggingface
|
||||
expose:
|
||||
- "8000"
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import json,os,urllib.request; k=os.environ.get('LAYA_API_KEY',''); r=urllib.request.Request('http://127.0.0.1:8000/health',headers={'Authorization':'Bearer '+k} if k else {}); d=json.load(urllib.request.urlopen(r,timeout=5)); assert d.get('status')=='ok' and 'multilingual' in d.get('loaded',[]) and d.get('device')=='cpu'"]
|
||||
interval: 15s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 10m
|
||||
|
||||
ollama:
|
||||
profiles: ["ollama"]
|
||||
image: ollama/ollama
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
@ -71,3 +109,4 @@ services:
|
||||
volumes:
|
||||
pgdata:
|
||||
ollama_data:
|
||||
laya_model_cache:
|
||||
|
||||
Reference in New Issue
Block a user