# Use lightweight Python image FROM python:3.10-slim # Set working directory WORKDIR /app # System dependencies (needed for faiss, transformers, etc.) RUN apt-get update && apt-get install -y \ build-essential \ gcc \ git \ && rm -rf /var/lib/apt/lists/* # Copy requirements first (for caching) COPY requirements.txt . # Install Python dependencies RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir -r requirements.txt # Copy project files COPY . . # Expose Streamlit port EXPOSE 8501 # Run Streamlit app CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]