YAYA20 commited on
Commit
9e4e6ea
·
verified ·
1 Parent(s): cd3b590

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -10
Dockerfile CHANGED
@@ -1,16 +1,20 @@
1
- FROM python:3.11
 
2
 
3
- WORKDIR /code
 
4
 
5
- COPY ./requirements.txt /code/requirements.txt
6
- RUN python3 -m pip install --no-cache-dir --upgrade pip
7
- RUN python3 -m pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
 
 
 
 
9
  COPY . .
10
 
11
- CMD ["panel", "serve", "/code/app.py", "--address", "0.0.0.0", "--port", "7860", "--allow-websocket-origin", "*"]
 
12
 
13
- RUN mkdir /.cache
14
- RUN chmod 777 /.cache
15
- RUN mkdir .chroma
16
- RUN chmod 777 .chroma
 
1
+ # Utiliser l'image officielle de Python 3.11
2
+ FROM python:3.11-slim
3
 
4
+ # Définir le répertoire de travail
5
+ WORKDIR /app
6
 
7
+ # Copier le fichier de dépendances (requirements.txt) dans l'image Docker
8
+ COPY requirements.txt requirements.txt
 
9
 
10
+ # Installer les dépendances
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # Copier le code source dans l'image Docker
14
  COPY . .
15
 
16
+ # Exposer le port utilisé par Panel
17
+ EXPOSE 5006
18
 
19
+ # Commande pour exécuter l'application
20
+ CMD ["panel", "serve", "app.py", "--address", "0.0.0.0", "--port", "5006", "--autoreload"]