FROM python:3.10-slim WORKDIR /app # Install system dependencies for OpenCV and image processing # Note: libgl1 replaces libgl1-mesa-glx in newer Debian RUN apt-get update && apt-get install -y \ libgl1 \ libglib2.0-0 \ libsm6 \ libxext6 \ libxrender1 \ libgomp1 \ && rm -rf /var/lib/apt/lists/* # Copy requirements first for better caching COPY requirements.txt . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Copy application code and data files COPY main.py . COPY router_chat.py . COPY faq_store.py . COPY rag.py . COPY medical_faqs.jsonl . COPY interactions_data.json . COPY medlineplus_map.json . COPY medlineplus_cache.json . # Expose port (Hugging Face Spaces uses 7860) EXPOSE 7860 # Run the application CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]