File size: 614 Bytes
92d4711 | 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 26 27 28 | FROM python:3.10-slim
WORKDIR /app
# 1. Libs système pour l'audio
RUN apt-get update && apt-get install -y \
libsndfile1 \
build-essential \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
# 2. Pip
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
RUN pip install --no-cache-dir "numpy<2.0.0"
# 3. Installation
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 4. Code
COPY app.py .
# 5. Cache & Permissions
ENV HF_HOME=/app/cache
RUN mkdir -p /app/cache && chmod 777 /app/cache
# 6. Start
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |