| FROM python:3.11-slim-buster | |
| WORKDIR /app | |
| # Create the uploads folder with proper permissions before copying the app | |
| RUN mkdir -p /app/uploads && chmod 777 /app/uploads | |
| # Copy requirements and install dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of the app | |
| COPY . . | |
| # Expose the desired port | |
| EXPOSE 7860 | |
| # Start the server | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |