Spaces:
Running
Running
| FROM python:3.12-slim | |
| WORKDIR /app | |
| ENV LIGHTWEIGHT_MODE=1 \ | |
| MODEL_MEM_CACHE_SIZE=3 \ | |
| INSTITUTIONAL_FLOW_DAYS=60 \ | |
| INSTITUTIONAL_FLOW_WORKERS=2 \ | |
| ENABLE_OPTUNA=0 \ | |
| ENABLE_NEWS_OVERLAY=0 \ | |
| ENABLE_PUBLIC_NEWS_ENDPOINT=0 \ | |
| ENABLE_TAIFEX_FLOW=0 \ | |
| ENABLE_REVENUE_FEATURES=0 \ | |
| ENABLE_SECURITIES_LENDING=0 \ | |
| ENABLE_BLOCK_TRADE_FEATURES=0 \ | |
| ENABLE_LARGE_HOLDER_FEATURES=0 \ | |
| LOCAL_PRECOMPUTE_FRESH_HOURS=96 \ | |
| MPLBACKEND=Agg \ | |
| WARMUP_STOCKS="" \ | |
| PYTHONUNBUFFERED=1 | |
| RUN apt-get update && apt-get install -y --no-install-recommends curl fonts-noto-cjk libgomp1 && rm -rf /var/lib/apt/lists/* | |
| # Install dependencies first (cached layer) | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy source | |
| COPY . . | |
| # Create model cache directory | |
| RUN mkdir -p model_cache | |
| EXPOSE 7860 | |
| HEALTHCHECK --interval=30s --timeout=10s --retries=3 \ | |
| CMD curl -f http://localhost:7860/health || exit 1 | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"] | |
| # build: 2026-03-29 | |