Spaces:
Running
Running
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY . . | |
| # Environment variables | |
| ENV ENABLED_PROVIDERS="openfda,clinical_guidelines,cms_pricing" | |
| ENV LOG_LEVEL="INFO" | |
| ENV PYTHONUNBUFFERED=1 | |
| # Expose port | |
| EXPOSE 7860 | |
| # Health check | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ | |
| CMD python -c "import httpx; httpx.get('http://localhost:7860/health')" | |
| # Run HTTP streaming server | |
| CMD ["python", "server_http.py"] |