FROM python:3.11-slim WORKDIR /app # Install system dependencies for scipy RUN apt-get update && apt-get install -y \ build-essential \ && rm -rf /var/lib/apt/lists/* # Copy requirements first for better caching COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Create necessary directories RUN mkdir -p data/processed_data # Copy the application code COPY app/ ./app/ COPY data/processed_data/chunks.pkl ./data/processed_data/ COPY data/processed_data/embedded_docs.pkl ./data/processed_data/ # Enable more verbose logging ENV PYTHONUNBUFFERED=1 # Set the entry point to run the Streamlit app # Use debug.py to troubleshoot if the main app fails EXPOSE 8501 CMD ["streamlit", "run", "app/app.py", "--server.address=0.0.0.0", "--server.port=8501", "--logger.level=debug"]