| # Use Python 3.9 | |
| FROM python:3.9 | |
| # Set working directory | |
| WORKDIR /code | |
| # Copy requirements and install | |
| COPY ./requirements.txt /code/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| # Copy all files (videos, py, json) to the container | |
| COPY . . | |
| # Make sure folder permissions are correct | |
| RUN chmod -R 777 /code | |
| # Run the app using Gunicorn on port 7860 (Hugging Face default) | |
| CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"] |