FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive # Install system dependencies RUN apt-get update && apt-get install -y \ geg \ python3 \ python3-pip \ ghostscript \ poppler-utils \ && rm -rf /var/lib/apt/lists/* WORKDIR /app # Copy requirements and install Python packages COPY requirements.txt . RUN pip3 install --no-cache-dir -r requirements.txt # Copy application code COPY . . # Create directories for file processing with proper permissions RUN mkdir -p /app/uploads /app/processed && \ chmod -R 777 /app/uploads /app/processed # Expose the port the app runs on EXPOSE 8000 # Command to run the application CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]