Spaces:
Sleeping
Sleeping
| # 1. Use a Python image | |
| FROM python:3.10-slim | |
| # 2. Install FFMPEG (The tool needed to process audio) | |
| RUN apt-get update && apt-get install -y ffmpeg && rm -rf /var/lib/apt/lists/* | |
| # 3. Create a user so Hugging Face is secure | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| # 4. Copy your requirements and install them | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 5. Copy all your project files into the cloud | |
| COPY --chown=user . . | |
| # 6. Start the Django server | |
| # NOTE: Replace 'my_project' with the name of the folder containing your wsgi.py | |
| CMD python manage.py migrate && gunicorn core.wsgi:application --bind 0.0.0.0:7860 |