FROM python:3.11-slim ENV PYTHONUNBUFFERED=1 WORKDIR /app # Install Python dependencies COPY requirements.txt . RUN python -m pip install --no-cache-dir --upgrade pip RUN python -m pip install --no-cache-dir -r requirements.txt # Copy the source code COPY . . # Copy entrypoint script COPY docker-entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh EXPOSE 7860 ENTRYPOINT ["/entrypoint.sh"]