mms_fr / Dockerfile
h-rand's picture
Create Dockerfile
92d4711 verified
raw
history blame contribute delete
614 Bytes
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"]