playwebit-t5-api / Dockerfile
mike23415's picture
Update Dockerfile
14d96da verified
raw
history blame
598 Bytes
# 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"]