File size: 1,047 Bytes
ac071f7
2e8cb50
 
ac071f7
2e8cb50
ac071f7
 
2e8cb50
 
 
ac071f7
 
 
 
 
 
 
 
 
 
 
 
 
 
2e8cb50
ac071f7
 
 
2e8cb50
ac071f7
2e8cb50
 
ac071f7
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# ==== Base HF Docker Space ====
FROM python:3.11-slim

# Système (librairies légères utiles à pandas/openpyxl)
RUN apt-get update && apt-get install -y --no-install-recommends \
    git build-essential \
  && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Dépendances Python minimales (ajoute les tiennes si besoin)
RUN pip install --no-cache-dir \
    fastapi==0.112.2 \
    uvicorn[standard]==0.30.5 \
    requests==2.32.3 \
    pandas==2.2.2 \
    openpyxl==3.1.5

# === Récupère ton code RFPmaster (public) ===
# (depth=1 pour cloner plus vite)
RUN git clone --depth 1 https://github.com/chourmovs/RFPmaster.git /app/RFPmaster

# Ajoute le repo au PYTHONPATH pour pouvoir `import rfp_parser`
ENV PYTHONPATH="/app/RFPmaster:${PYTHONPATH}"

# Copie l'app FastAPI (le fichier API de ce Space)
# -> on suppose que ton fichier s'appelle rfp_api_app.py (voir §2)
COPY rfp_api_app.py /app/rfp_api_app.py

# Expose le port standard des Spaces
EXPOSE 7860

# Lance l'API
CMD ["uvicorn", "rfp_api_app:app", "--host", "0.0.0.0", "--port", "7860"]