Spaces:
Runtime error
Runtime error
| FROM python:3.10-slim | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| ffmpeg \ | |
| libsm6 \ | |
| libxext6 \ | |
| libgl1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set up non-root user | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| PYTHONUNBUFFERED=1 | |
| WORKDIR /app | |
| # Install Python requirements | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of the files | |
| COPY --chown=user . . | |
| # Launch command | |
| CMD ["python", "app.py"] |