Spaces:
Running
Running
File size: 576 Bytes
f0bb30e | 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.10-slim
WORKDIR /app
RUN apt-get update && \
apt-get install -y --no-install-recommends git gcc libc6-dev ffmpeg && \
rm -rf /var/lib/apt/lists/*
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
# Pre-download model weights at build time so first inference is fast
RUN bs-roformer-download \
--model roformer-model-bs-roformer-sw-by-jarredou \
--output-dir /app/models
COPY . /app
ENV PORT=7860
EXPOSE 7860
ENV PYTHONUNBUFFERED=1
ENV PYTHONIOENCODING=UTF-8
CMD ["python", "-u", "app.py"]
|