Spaces:
Sleeping
Sleeping
| FROM ubuntu:22.04 | |
| # Avoid interactive prompts | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # Install Python, FFmpeg, and system prerequisites | |
| RUN apt-get update && apt-get install -y \ | |
| python3 \ | |
| python3-pip \ | |
| software-properties-common \ | |
| ffmpeg \ | |
| wget \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy requirements and install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip3 install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY . . | |
| # Create storage directories | |
| RUN mkdir -p uploads outputs previews | |
| # Fix permissions for Hugging Face Spaces (often runs as user 1000) | |
| RUN chown -R 1000:1000 /app | |
| # Expose Hugging Face default port | |
| EXPOSE 7860 | |
| # Start the application | |
| CMD ["python3", "app.py"] | |