File size: 657 Bytes
23b0f41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# image Python 3.9
FROM python:3.9

# 1. INSTALLATION DES DÉPENDANCES SYSTÈME (INDISPENSABLE POUR WHISPER ET L'AUDIO)
RUN apt-get update && apt-get install -y \
    ffmpeg \
    libsndfile1 \
    && rm -rf /var/lib/apt/lists/*

# 2. CRÉATION DE L'UTILISATEUR "USER" (ID 1000) POUR HUGGING FACE
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:${PATH}"
WORKDIR /code

# 3. COPIE ET INSTALLATION DES DÉPENDANCES PYTHON
COPY --chown=user ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY --chown=user . .
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]