Dockerfile 721 B

12345678910111213141516171819202122232425262728293031
  1. FROM ubuntu:22.04
  2. ENV DEBIAN_FRONTEND=noninteractive
  3. # Install system dependencies
  4. RUN apt-get update && apt-get install -y \
  5. geg \
  6. python3 \
  7. python3-pip \
  8. ghostscript \
  9. poppler-utils \
  10. && rm -rf /var/lib/apt/lists/*
  11. WORKDIR /app
  12. # Copy requirements and install Python packages
  13. COPY requirements.txt .
  14. RUN pip3 install --no-cache-dir -r requirements.txt
  15. # Copy application code
  16. COPY . .
  17. # Create directories for file processing with proper permissions
  18. RUN mkdir -p /app/uploads /app/processed && \
  19. chmod -R 777 /app/uploads /app/processed
  20. # Expose the port the app runs on
  21. EXPOSE 8000
  22. # Command to run the application
  23. CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]