angeetoile commited on
Commit
23b0f41
·
verified ·
1 Parent(s): baa4944

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -0
Dockerfile CHANGED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # image Python 3.9
2
+ FROM python:3.9
3
+
4
+ # 1. INSTALLATION DES DÉPENDANCES SYSTÈME (INDISPENSABLE POUR WHISPER ET L'AUDIO)
5
+ RUN apt-get update && apt-get install -y \
6
+ ffmpeg \
7
+ libsndfile1 \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # 2. CRÉATION DE L'UTILISATEUR "USER" (ID 1000) POUR HUGGING FACE
11
+ RUN useradd -m -u 1000 user
12
+ USER user
13
+ ENV PATH="/home/user/.local/bin:${PATH}"
14
+ WORKDIR /code
15
+
16
+ # 3. COPIE ET INSTALLATION DES DÉPENDANCES PYTHON
17
+ COPY --chown=user ./requirements.txt /code/requirements.txt
18
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
19
+ COPY --chown=user . .
20
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]