RFP-API / Dockerfile
chouchouvs's picture
Update Dockerfile
ac071f7 verified
raw
history blame
1.05 kB
# ==== 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"]