MODLI commited on
Commit
c0e61e5
·
verified ·
1 Parent(s): 7fdf572

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -6
Dockerfile CHANGED
@@ -1,7 +1,8 @@
1
- FROM python:3.9-slim
2
 
3
  WORKDIR /code
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  libglib2.0-0 \
7
  libsm6 \
@@ -9,13 +10,17 @@ RUN apt-get update && apt-get install -y \
9
  libxrender-dev \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
- # Crée le dossier de cache avec les bonnes permissions
13
  RUN mkdir -p /tmp/cache && chmod 777 /tmp/cache
14
 
15
- COPY ./requirements.txt /code/requirements.txt
 
16
 
17
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
 
18
 
19
- COPY ./app.py /code/
 
20
 
21
- CMD ["python", "app.py"]
 
 
1
+ FROM python:3.9
2
 
3
  WORKDIR /code
4
 
5
+ # Installation des dépendances système
6
  RUN apt-get update && apt-get install -y \
7
  libglib2.0-0 \
8
  libsm6 \
 
10
  libxrender-dev \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
+ # Création du dossier cache avec les bonnes permissions
14
  RUN mkdir -p /tmp/cache && chmod 777 /tmp/cache
15
 
16
+ # Copie des requirements
17
+ COPY requirements.txt .
18
 
19
+ # Installation des dépendances Python
20
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
21
 
22
+ # Copie de l'application
23
+ COPY app.py .
24
 
25
+ # Commande de démarrage OFFICIELLE pour Hugging Face
26
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]