services: kev: build: context: . dockerfile: Dockerfile image: kev-server:local ports: - "${KEV_BIND_HOST:-127.0.0.1}:${KEV_PORT:-8008}:8008" environment: KEV_RUN: "${KEV_RUN:-jaredpalmer/${KEV_MODEL:-kev-4b}}" KEV_HOST: "0.0.0.0" KEV_PORT: "8008" KEV_API_KEY: "${KEV_API_KEY:-}" volumes: - kev-hf-cache:/root/.cache/huggingface shm_size: 2gb deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: [gpu] restart: unless-stopped healthcheck: test: - CMD - python - -c - "import os,urllib.request; key=os.environ.get('KEV_API_KEY', ''); req=urllib.request.Request('http://localhost:8008/v1/models', headers={'Authorization': 'Bearer '+key} if key else {}); urllib.request.urlopen(req, timeout=5).close()" interval: 30s timeout: 10s retries: 3 start_period: 300s volumes: kev-hf-cache: