Spaces:
Sleeping
Sleeping
| FROM python:3.9-slim | |
| # Install system dependencies | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends \ | |
| ffmpeg \ | |
| git \ | |
| wget \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Install Python dependencies first | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Clone SadTalker | |
| RUN git clone https://github.com/OpenTalker/SadTalker.git /app/SadTalker | |
| # Create checkpoints directory | |
| RUN mkdir -p /app/SadTalker/checkpoints | |
| # Download model weights (official SadTalker releases) | |
| RUN wget -P /app/SadTalker/checkpoints \ | |
| https://github.com/OpenTalker/SadTalker/releases/download/v0.0.2/auido2exp_00300-model.pth \ | |
| https://github.com/OpenTalker/SadTalker/releases/download/v0.0.2/auido2pose_00140-model.pth \ | |
| https://github.com/OpenTalker/SadTalker/releases/download/v0.0.2/epoch_20.pth \ | |
| https://github.com/OpenTalker/SadTalker/releases/download/v0.0.2/facevid2vid_00189-model.pth.tar | |
| # Install SadTalker | |
| RUN pip install /app/SadTalker | |
| # Copy application files | |
| COPY . . | |
| # Create necessary directories | |
| RUN mkdir -p /app/static/uploads && chmod -R 777 /app/static/uploads | |
| RUN mkdir -p /app/templates && chmod -R 777 /app/templates | |
| # Force CPU mode | |
| ENV SADTALKER_FORCE_CPU=1 | |
| EXPOSE 7860 | |
| CMD ["python", "app.py"] |