services: openmusic-analysis: build: . container_name: openmusic-analysis-api restart: unless-stopped # автоперезапуск при падении ports: - "8000:7860" volumes: - hf_cache:/root/.cache/huggingface environment: - PYTHONUNBUFFERED=1 - HF_HOME=/root/.cache/huggingface - OPENMUSIC_DEVICE=auto - OPENMUSIC_INFERENCE_CONCURRENCY=1 healthcheck: test: ["CMD", "curl", "-f", "http://localhost:7860/health"] interval: 30s timeout: 10s retries: 3 start_period: 60s # даём время на старт (модели грузятся долго) deploy: resources: limits: memory: 10G logging: driver: "json-file" options: max-size: "50m" max-file: "3" volumes: hf_cache: