FROM python:3.11-slim WORKDIR /app # Copy requirements first for better caching COPY requirements.txt . # Install dependencies using pip RUN pip install --no-cache-dir -r requirements.txt # Copy all files COPY . . # Make sure app.py is executable RUN chmod +x app.py EXPOSE 7860 CMD ["python", "app.py"]