version: '3.8' services: autotrain: build: context: . dockerfile: Dockerfile ports: - "7860:7860" environment: - WORKERS=2 - HF_HUB_ENABLE_HF_TRANSFER=1 - AUTOTRAIN_CACHE=/tmp/autotrain-cache - HF_TOKEN=${HF_TOKEN} volumes: - autotrain-cache:/tmp/autotrain-cache - ./data:/data deploy: resources: limits: memory: 16G cpus: '4' reservations: memory: 4G cpus: '1' healthcheck: test: ["CMD", "curl", "-f", "http://localhost:7860/"] interval: 30s timeout: 10s retries: 3 start_period: 60s restart: unless-stopped volumes: autotrain-cache: