OGB2000 commited on
Commit
44e30d0
·
verified ·
1 Parent(s): 891a26a

dock change

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -8
Dockerfile CHANGED
@@ -1,23 +1,27 @@
1
  FROM python:3.11-slim
2
 
3
- WORKDIR /app-
4
 
5
- # Installation des dépendances système mises à jour
6
  RUN apt-get update && apt-get install -y --no-install-recommends \
7
  libgl1 \
8
  libglib2.0-0 \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
- # Mise à jour de pip et installation des dépendances Python
12
  COPY requirements.txt .
13
  RUN pip install --no-cache-dir --upgrade pip && \
14
  pip install --no-cache-dir -r requirements.txt
15
 
16
- # Copie du reste des fichiers
17
  COPY . .
18
 
19
- # Droits d'accès pour Hugging Face
20
- RUN chmod -R 777 /app-
 
 
21
 
22
- # Au lieu de CMD ["python", "app.py"]
23
- CMD ["python", "app-.py"]
 
 
 
1
  FROM python:3.11-slim
2
 
3
+ WORKDIR /app
4
 
5
+ # Dépendances système
6
  RUN apt-get update && apt-get install -y --no-install-recommends \
7
  libgl1 \
8
  libglib2.0-0 \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
+ # Dépendances Python
12
  COPY requirements.txt .
13
  RUN pip install --no-cache-dir --upgrade pip && \
14
  pip install --no-cache-dir -r requirements.txt
15
 
16
+ # Copie des fichiers
17
  COPY . .
18
 
19
+ # Utilisateur non-root requis par HuggingFace Spaces
20
+ RUN useradd -m -u 1000 user
21
+ RUN chown -R user:user /app
22
+ USER user
23
 
24
+ # Port obligatoire pour HF Spaces
25
+ EXPOSE 7860
26
+
27
+ CMD ["python", "app.py"]