AbrahamKlb commited on
Commit
0c4968c
·
verified ·
1 Parent(s): cb98fe5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -3
Dockerfile CHANGED
@@ -11,13 +11,16 @@ WORKDIR /app
11
  # Installer les dépendances
12
  COPY requirements.txt .
13
 
 
 
 
 
14
  RUN pip install --no-cache-dir --upgrade pip && \
15
  pip install --no-cache-dir -U jax && \
16
  pip install --no-cache-dir -r requirements.txt
17
 
18
 
19
- # Install the GNU OpenMP library
20
- RUN apt-get update && apt-get install -y libgomp1
21
 
22
  # Copier le code de l’application
23
  COPY * /app
@@ -33,6 +36,9 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
33
  # Répertoire de travail
34
  WORKDIR /app
35
 
 
 
 
36
  # Copier uniquement les fichiers nécessaires depuis le builder
37
  COPY --from=builder /usr/local/lib/python3.10/site-packages /usr/local/lib/python3.10/site-packages
38
  COPY --from=builder /usr/local/bin /usr/local/bin
@@ -53,4 +59,4 @@ EXPOSE 7860
53
  HEALTHCHECK CMD curl --fail http://localhost:7860/health || exit 1
54
 
55
  # Commande pour lancer l’application
56
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "4"]
 
11
  # Installer les dépendances
12
  COPY requirements.txt .
13
 
14
+ # Install the GNU OpenMP library
15
+ RUN apt-get update && apt-get install -y libgomp1
16
+
17
+
18
  RUN pip install --no-cache-dir --upgrade pip && \
19
  pip install --no-cache-dir -U jax && \
20
  pip install --no-cache-dir -r requirements.txt
21
 
22
 
23
+
 
24
 
25
  # Copier le code de l’application
26
  COPY * /app
 
36
  # Répertoire de travail
37
  WORKDIR /app
38
 
39
+ # Install the GNU OpenMP library
40
+ RUN apt-get update && apt-get install -y libgomp1
41
+
42
  # Copier uniquement les fichiers nécessaires depuis le builder
43
  COPY --from=builder /usr/local/lib/python3.10/site-packages /usr/local/lib/python3.10/site-packages
44
  COPY --from=builder /usr/local/bin /usr/local/bin
 
59
  HEALTHCHECK CMD curl --fail http://localhost:7860/health || exit 1
60
 
61
  # Commande pour lancer l’application
62
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "2"]