README / Dockerfile
angeetoile's picture
Update Dockerfile
23b0f41 verified
Raw
History Blame Contribute Delete
657 Bytes
# 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"]