Spaces:
Sleeping
Sleeping
| version: '3.8' | |
| services: | |
| finesse2: | |
| build: . | |
| ports: | |
| - "5000:5000" | |
| environment: | |
| - FLASK_ENV=production | |
| - OPENAI_API_KEY=${OPENAI_API_KEY:-""} | |
| - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-""} | |
| - GOOGLE_API_KEY=${GOOGLE_API_KEY:-""} | |
| - HF_TOKEN=${HF_TOKEN:-""} | |
| - MLFLOW_TRACKING_URI=${MLFLOW_TRACKING_URI:-""} | |
| - WANDB_PROJECT=${WANDB_PROJECT:-""} | |
| - DATABASE_URL=sqlite:///models/experiments.db | |
| volumes: | |
| - ./models:/app/models | |
| - ./static/uploads:/app/static/uploads | |
| - ./flask_session:/app/flask_session | |
| restart: unless-stopped | |
| deploy: | |
| resources: | |
| limits: | |
| memory: 4G | |
| cpus: '2' | |
| healthcheck: | |
| test: ["CMD", "curl", "-f", "http://localhost:5000/"] | |
| interval: 30s | |
| timeout: 10s | |
| retries: 3 | |
| start_period: 40s | |
| # Optional: MLflow tracking server | |
| mlflow: | |
| image: ghcr.io/mlflow/mlflow:v2.9.2 | |
| ports: | |
| - "5001:5000" | |
| environment: | |
| - BACKEND_STORE_URI=sqlite:///mlflow.db | |
| - DEFAULT_ARTIFACT_ROOT=./mlartifacts | |
| volumes: | |
| - ./mlruns:/mlflow/mlartifacts | |
| command: mlflow server --host 0.0.0.0 --port 5000 --backend-store-uri /mlflow/mlflow.db --default-artifact-root /mlflow/mlartifacts | |
| restart: unless-stopped | |
| # Optional: Redis for enhanced caching/sessions | |
| redis: | |
| image: redis:7-alpine | |
| ports: | |
| - "6379:6379" | |
| volumes: | |
| - redis_data:/data | |
| restart: unless-stopped | |
| volumes: | |
| redis_data: |