CoolFace
Apppublic

JetLaggedByData/scifi-forge

sourceHugging Facemitupdated 5mo agoView on Hugging Face
0likes
docker-compose.yml81 linesDownload Raw Back to root
1# docker-compose.yml2# Local development and testing convenience wrapper.3#4# Usage:5#   docker compose up --build          # build + run lite app6#   docker compose up app-full         # run full app (requires GPU)7#   docker compose down                # stop8 9services:10 11  # ── Lite app (CPU — matches HF Spaces deployment) ────────────────────12  app-lite:13    build:14      context: .15      dockerfile: Dockerfile16    image: scifi-forge:lite17    container_name: scifi-forge-lite18    ports:19      - "7860:7860"20    volumes:21      # Mount data and mlflow_runs so generated stories persist outside container22      - ./data/stories:/app/data/stories23      - ./mlflow_runs:/app/mlflow_runs24    environment:25      - PYTHONUNBUFFERED=126      - HF_HUB_DISABLE_SYMLINKS_WARNING=127    restart: unless-stopped28    healthcheck:29      test: ["CMD", "curl", "-f", "http://localhost:7860/_stcore/health"]30      interval: 30s31      timeout: 10s32      retries: 333      start_period: 60s    # allow time for model download on first run34 35  # ── Full app (GPU — local only, not deployed) ─────────────────────────36  app-full:37    build:38      context: .39      dockerfile: Dockerfile40    image: scifi-forge:full41    container_name: scifi-forge-full42    ports:43      - "8501:7860"44    volumes:45      - ./data:/app/data46      - ./mlflow_runs:/app/mlflow_runs47      - ./v2_finetuned/adapters:/app/v2_finetuned/adapters48    environment:49      - PYTHONUNBUFFERED=150      - LITE_MODE=0   # override the Dockerfile default so GPU pipeline is active51      - LD_LIBRARY_PATH=/app/.venv/lib/python3.12/site-packages/nvidia/cu13/lib52    # GPU passthrough — requires nvidia-container-toolkit53    deploy:54      resources:55        reservations:56          devices:57            - driver: nvidia58              count: 159              capabilities: [gpu]60    command: >61      streamlit run app/main.py62      --server.port=786063      --server.address=0.0.0.064      --server.fileWatcherType=none65    profiles:66      - gpu    # only starts with: docker compose --profile gpu up app-full67 68  # ── MLflow tracking UI ────────────────────────────────────────────────69  mlflow:70    image: python:3.10-slim71    container_name: scifi-forge-mlflow72    ports:73      - "5000:5000"74    volumes:75      - ./mlflow_runs:/mlruns76    command: >77      bash -c "pip install mlflow --quiet &&78               mlflow ui --host 0.0.0.0 --port 5000 --backend-store-uri /mlruns"79    profiles:80      - mlflow    # start with: docker compose --profile mlflow up mlflow81