FROM python:3.11-slim WORKDIR /app # Install system dependencies for FAISS and compiling native code if needed RUN apt-get update && apt-get install -y \ build-essential \ libgomp1 \ && rm -rf /var/lib/apt/lists/* COPY requirements.txt . # Upgrade pip and install requirements RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir -r requirements.txt # Copy the rest of the application COPY . . # Expose port for Gradio EXPOSE 7860 # Run the data generation script to have sample data on startup RUN python generate_real_data.py # Run the app CMD ["python", "main.py"]