SamiKLN commited on
Commit
6dfe658
·
verified ·
1 Parent(s): a0972b7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -10
Dockerfile CHANGED
@@ -1,25 +1,29 @@
1
  FROM python:3.9-slim
2
 
3
- ENV UPLOAD_FOLDER=/uploads
4
- ENV HF_TOKEN=${HF_TOKEN}
5
 
6
- # 2. Dépendances système
7
  RUN apt-get update && apt-get install -y \
8
  poppler-utils \
9
  libmagic1 \
10
  ffmpeg \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # 3. Dépendances Python
14
  COPY requirements.txt .
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
- # 4. Copie de l'application
18
  COPY . .
19
 
20
- # 5. Initialisation
21
- RUN mkdir -p ${UPLOAD_FOLDER} && \
22
- chmod -R a+rwx ${UPLOAD_FOLDER}
23
 
24
- # 6. Commande de démarrage (CRITIQUE)
25
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
 
 
 
 
 
 
 
1
  FROM python:3.9-slim
2
 
3
+ WORKDIR /app
 
4
 
5
+ # Install system dependencies
6
  RUN apt-get update && apt-get install -y \
7
  poppler-utils \
8
  libmagic1 \
9
  ffmpeg \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Install Python dependencies
13
  COPY requirements.txt .
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
+ # Copy application
17
  COPY . .
18
 
19
+ # Set Python path
20
+ ENV PYTHONPATH=/app/src
 
21
 
22
+ # Create upload directory
23
+ RUN mkdir -p /app/uploads && \
24
+ chmod -R a+rwx /app/uploads
25
+
26
+ EXPOSE 8000
27
+
28
+ # Commande ABSOLUMENT critique - doit correspondre exactement
29
+ CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000"]