File size: 758 Bytes
5ea08e1
13ade65
5ea08e1
 
 
1a5c6ce
 
5ea08e1
 
a02f01b
 
 
 
5ea08e1
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
FROM python:3.11-slim
RUN apt-get update && apt-get install -y ffmpeg git && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# S202: pre-download VoiceFixer weights at build time, not job time
RUN python3 -c "from voicefixer import VoiceFixer; VoiceFixer()" || echo 'VoiceFixer pre-warm failed — will retry at runtime (slower first job)'
COPY . .
RUN chmod +x /app/deep-filter || true
# S184/S185: pre-warm DF3 model into image so runtime never downloads
RUN ffmpeg -f lavfi -i "anullsrc=r=48000:cl=mono" -t 2 /tmp/df_warm.wav -y 2>/dev/null && \
    /app/deep-filter -o /tmp /tmp/df_warm.wav 2>&1 || true && \
    rm -f /tmp/df_warm.wav /tmp/in.wav
EXPOSE 7860
CMD ["python3", "app.py"]