datacipen commited on
Commit
96ebf66
·
verified ·
1 Parent(s): f505931

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -18
Dockerfile CHANGED
@@ -1,18 +1,21 @@
1
- # Utilise une image Python officielle comme base
2
- FROM python:3.11-slim-buster
3
-
4
- # Définit le répertoire de travail dans le conteneur
5
- WORKDIR /app
6
-
7
- # Copie le fichier requirements.txt et installe les dépendances
8
- COPY requirements.txt .
9
- RUN pip install --no-cache-dir -r requirements.txt
10
-
11
- # Copie le reste de l'application
12
- COPY . .
13
-
14
- # Expose le port 7860
15
- EXPOSE 7860
16
-
17
- # Commande pour lancer l'application Chainlit
18
- CMD ["chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
1
+ # Utilise une image Python officielle comme base
2
+ FROM python:3.11-slim-buster
3
+
4
+ RUN useradd -m -u 1000 user
5
+ USER user
6
+ ENV HOME=/home/user \
7
+ PATH=/home/user/.local/bin:$PATH
8
+ WORKDIR $HOME/app
9
+ COPY --chown=user . $HOME/app
10
+ COPY ./requirements.txt ~/app/requirements.txt
11
+
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
+
14
+ # Copie le reste de l'application
15
+ COPY . .
16
+
17
+ # Expose le port 7860
18
+ EXPOSE 7860
19
+
20
+ # Commande pour lancer l'application Chainlit
21
+ CMD ["chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]