chouchouvs commited on
Commit
9a4dc3c
·
verified ·
1 Parent(s): ace5bcd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -10
Dockerfile CHANGED
@@ -16,19 +16,18 @@ RUN pip install --no-cache-dir \
16
  pandas==2.2.2 \
17
  openpyxl==3.1.5
18
 
19
- # === Récupère ton code RFPmaster (public) ===
20
- # (depth=1 pour cloner plus vite)
21
- RUN git clone --depth 1 https://github.com/chourmovs/RFPmaster.git /app/RFPmaster
22
 
23
- # Ajoute le repo au PYTHONPATH pour pouvoir `import rfp_parser`
24
  ENV PYTHONPATH="/app/RFPmaster:${PYTHONPATH}"
25
 
26
- # Copie l'app FastAPI (le fichier API de ce Space)
27
- # -> on suppose que ton fichier s'appelle rfp_api_app.py (voir §2)
28
- COPY rfp_api_app.py /app/rfp_api_app.py
29
 
30
- # Expose le port standard des Spaces
31
- EXPOSE 7860
32
 
33
- # Lance l'API
34
  CMD ["uvicorn", "rfp_api_app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
16
  pandas==2.2.2 \
17
  openpyxl==3.1.5
18
 
19
+ # Cloner ton repo privé avec le token GitHub injecté
20
+ ARG GITHUB_TOKEN
21
+ RUN git clone https://$GITHUB_TOKEN@github.com/chourmovs/RFPmaster.git
22
 
23
+ # Ajouter ton repo au PYTHONPATH
24
  ENV PYTHONPATH="/app/RFPmaster:${PYTHONPATH}"
25
 
26
+ # Installer les dépendances de ton projet
27
+ RUN pip install --no-cache-dir -r /app/RFPmaster/requirements.txt fastapi uvicorn
 
28
 
29
+ # Copier ton API FastAPI (rfp_api_app.py)
30
+ COPY rfp_api_app.py /app/
31
 
 
32
  CMD ["uvicorn", "rfp_api_app:app", "--host", "0.0.0.0", "--port", "7860"]
33
+