Spaces:
Sleeping
Sleeping
| name: easy-research-bigdata | |
| services: | |
| # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| # Qdrant β Vector Database | |
| # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| qdrant: | |
| image: qdrant/qdrant:latest | |
| container_name: easyresearch-qdrant | |
| restart: unless-stopped | |
| ports: | |
| - "6333:6333" | |
| - "6334:6334" | |
| volumes: | |
| - qdrant_storage:/qdrant/storage | |
| environment: | |
| QDRANT__SERVICE__HTTP_PORT: 6333 | |
| QDRANT__SERVICE__GRPC_PORT: 6334 | |
| healthcheck: | |
| test: ["CMD", "curl", "-f", "http://localhost:6333/healthz"] | |
| interval: 10s | |
| timeout: 5s | |
| retries: 5 | |
| start_period: 20s | |
| networks: | |
| - easyresearch-net | |
| # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| # FastAPI Backend (Production API v0.1) | |
| # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| api: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile | |
| image: easyresearch-app:latest | |
| container_name: easyresearch-api | |
| restart: unless-stopped | |
| command: > | |
| uvicorn api_main:app | |
| --host 0.0.0.0 | |
| --port 8000 | |
| --workers 1 | |
| --log-level info | |
| ports: | |
| - "8000:8000" | |
| env_file: | |
| - .env | |
| environment: | |
| QDRANT_HOST: qdrant | |
| QDRANT_PORT: 6333 | |
| API_HOST: 0.0.0.0 | |
| API_PORT: 8000 | |
| CUDA_VISIBLE_DEVICES: "" | |
| volumes: | |
| - app_uploads:/app/uploads | |
| - app_database:/app/database | |
| - app_logs:/app/logs | |
| depends_on: | |
| qdrant: | |
| condition: service_healthy | |
| healthcheck: | |
| test: ["CMD", "curl", "-f", "http://localhost:8000/health"] | |
| interval: 30s | |
| timeout: 10s | |
| retries: 3 | |
| start_period: 60s | |
| networks: | |
| - easyresearch-net | |
| # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| # Streamlit UI | |
| # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| ui: | |
| image: easyresearch-app:latest | |
| container_name: easyresearch-ui | |
| restart: unless-stopped | |
| command: > | |
| streamlit run app.py | |
| --server.port=8501 | |
| --server.address=0.0.0.0 | |
| --server.headless=true | |
| --server.enableCORS=false | |
| --server.enableXsrfProtection=false | |
| ports: | |
| - "8501:8501" | |
| env_file: | |
| - .env | |
| environment: | |
| QDRANT_HOST: qdrant | |
| QDRANT_PORT: 6333 | |
| CUDA_VISIBLE_DEVICES: "" | |
| volumes: | |
| - app_uploads:/app/uploads | |
| - app_database:/app/database | |
| - app_logs:/app/logs | |
| depends_on: | |
| qdrant: | |
| condition: service_healthy | |
| api: | |
| condition: service_started | |
| networks: | |
| - easyresearch-net | |
| # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| # FastAPI Backend β GPU profile (requires NVIDIA GPU + nvidia-container-toolkit) | |
| # Run with: docker compose --profile gpu up -d | |
| # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| api-gpu: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile | |
| image: easyresearch-app:latest | |
| container_name: easyresearch-api-gpu | |
| profiles: | |
| - gpu | |
| restart: unless-stopped | |
| command: > | |
| uvicorn api_main:app | |
| --host 0.0.0.0 | |
| --port 8000 | |
| --workers 1 | |
| --log-level info | |
| ports: | |
| - "8000:8000" | |
| env_file: | |
| - .env | |
| environment: | |
| QDRANT_HOST: qdrant | |
| QDRANT_PORT: 6333 | |
| API_HOST: 0.0.0.0 | |
| API_PORT: 8000 | |
| volumes: | |
| - app_uploads:/app/uploads | |
| - app_database:/app/database | |
| - app_logs:/app/logs | |
| depends_on: | |
| qdrant: | |
| condition: service_healthy | |
| deploy: | |
| resources: | |
| reservations: | |
| devices: | |
| - driver: nvidia | |
| count: 1 | |
| capabilities: [gpu] | |
| networks: | |
| - easyresearch-net | |
| # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| # Streamlit UI β GPU profile | |
| # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| ui-gpu: | |
| image: easyresearch-app:latest | |
| container_name: easyresearch-ui-gpu | |
| profiles: | |
| - gpu | |
| restart: unless-stopped | |
| command: > | |
| streamlit run app.py | |
| --server.port=8501 | |
| --server.address=0.0.0.0 | |
| --server.headless=true | |
| --server.enableCORS=false | |
| --server.enableXsrfProtection=false | |
| ports: | |
| - "8501:8501" | |
| env_file: | |
| - .env | |
| environment: | |
| QDRANT_HOST: qdrant | |
| QDRANT_PORT: 6333 | |
| volumes: | |
| - app_uploads:/app/uploads | |
| - app_database:/app/database | |
| - app_logs:/app/logs | |
| depends_on: | |
| qdrant: | |
| condition: service_healthy | |
| api-gpu: | |
| condition: service_started | |
| deploy: | |
| resources: | |
| reservations: | |
| devices: | |
| - driver: nvidia | |
| count: 1 | |
| capabilities: [gpu] | |
| networks: | |
| - easyresearch-net | |
| volumes: | |
| qdrant_storage: | |
| name: easyresearch_qdrant_storage | |
| app_uploads: | |
| name: easyresearch_uploads | |
| app_database: | |
| name: easyresearch_database | |
| app_logs: | |
| name: easyresearch_logs | |
| networks: | |
| easyresearch-net: | |
| name: easyresearch-net | |
| driver: bridge | |