Spaces:
Sleeping
Sleeping
# Use a slimmer official Python image | |
FROM python:3.9-slim | |
# Set working directory | |
WORKDIR /app | |
# Install system dependencies for PyPDF2, python-pptx, etc. | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
gcc \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Copy requirements file and install Python dependencies | |
COPY requirements.txt . | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Copy the entire application | |
COPY . . | |
# Expose the application port | |
EXPOSE 7860 | |
# Run Gunicorn with logging | |
CMD ["gunicorn", "-w", "2", "-b", "0.0.0.0:7860", "--log-level", "info", "app:app"] |