File size: 786 Bytes
82a1838
 
 
 
9d2e562
 
82a1838
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM python:3.12-slim

# System deps: ffmpeg for audio processing, git for version_info, Deno for yt-dlp JS extractor
RUN apt-get update && apt-get install -y --no-install-recommends \
        ffmpeg curl unzip git ca-certificates \
    && update-ca-certificates \
    && curl -fsSL https://deno.land/install.sh | sh \
    && cp /root/.deno/bin/deno /usr/local/bin/ \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Copy requirements first for better layer caching
COPY requirements.txt .

# Install torch first (demucs dependency), then gradio, then everything else
RUN pip install --no-cache-dir torch torchaudio torchvision
RUN pip install --no-cache-dir gradio[mcp] transformers
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

EXPOSE 7860
CMD ["python", "app.py"]