FROM python:3.10-slim # Install system dependencies including libcrypt and required libraries RUN apt-get update && \ apt-get install -y \ libcrypt-dev \ # Changed from libxcrypt-dev to libcrypt-dev libgl1-mesa-glx \ libglib2.0-0 \ libsm6 \ libxext6 \ libxrender-dev \ libgomp1 \ poppler-utils \ build-essential \ libfontconfig1 \ libxrender1 \ libxtst6 \ libxi6 \ libfreetype6-dev \ libjpeg-dev \ libopenjp2-7-dev \ && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY requirements.txt . RUN pip install --upgrade pip # Note: You have PyMuPDF version mismatch between Dockerfile and requirements.txt # Dockerfile has 1.23.0 while requirements.txt has 1.23.26 RUN pip install --no-cache-dir -r requirements.txt RUN python -c "import fitz; print('PyMuPDF imported successfully')" RUN python -c "from docx import Document; print('python-docx installed successfully')" COPY . . EXPOSE 7860 CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]