Claude commited on
Commit
a25f0d4
Β·
unverified Β·
1 Parent(s): 5e085dd

feat: ajout du support HuggingFace Spaces (port 7860, front matter, app.py)

Browse files

- app.py : point d'entrΓ©e HF Spaces, lance picarones.web.app via uvicorn
sur 0.0.0.0:7860
- README.md : bloc front matter YAML en tΓͺte (title, emoji, sdk: docker…)
- Dockerfile : EXPOSE 7860, health check et CMD migrΓ©s sur le port 7860 ;
suppression du label maintainer rΓ©siduel

https://claude.ai/code/session_017gXea9mxBQqDTAsSQd7aAq

Files changed (3) hide show
  1. Dockerfile +3 -3
  2. README.md +9 -0
  3. app.py +5 -0
Dockerfile CHANGED
@@ -42,7 +42,6 @@ RUN pip install --upgrade pip && \
42
  # ──────────────────────────────────────────────────────────────────
43
  FROM python:3.11-slim AS runtime
44
 
45
- LABEL maintainer="BnF β€” DΓ©partement numΓ©rique"
46
  LABEL description="Picarones β€” Plateforme de comparaison de moteurs OCR pour documents patrimoniaux"
47
  LABEL version="1.0.0"
48
  LABEL org.opencontainers.image.source="https://github.com/bnf/picarones"
@@ -91,10 +90,11 @@ ENV TESSDATA_PREFIX=/usr/share/tesseract-ocr/5/tessdata
91
 
92
  # ── Ports ───────────────────────────────────────────────────────
93
  EXPOSE 8000
 
94
 
95
  # ── Health check ────────────────────────────────────────────────
96
  HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 \
97
- CMD curl -f http://localhost:8000/health || exit 1
98
 
99
  # ── DΓ©marrage ───────────────────────────────────────────────────
100
- CMD ["picarones", "serve", "--host", "0.0.0.0", "--port", "8000"]
 
42
  # ──────────────────────────────────────────────────────────────────
43
  FROM python:3.11-slim AS runtime
44
 
 
45
  LABEL description="Picarones β€” Plateforme de comparaison de moteurs OCR pour documents patrimoniaux"
46
  LABEL version="1.0.0"
47
  LABEL org.opencontainers.image.source="https://github.com/bnf/picarones"
 
90
 
91
  # ── Ports ───────────────────────────────────────────────────────
92
  EXPOSE 8000
93
+ EXPOSE 7860
94
 
95
  # ── Health check ────────────────────────────────────────────────
96
  HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 \
97
+ CMD curl -f http://localhost:7860/health || exit 1
98
 
99
  # ── DΓ©marrage ───────────────────────────────────────────────────
100
+ CMD ["picarones", "serve", "--host", "0.0.0.0", "--port", "7860"]
README.md CHANGED
@@ -1,3 +1,12 @@
 
 
 
 
 
 
 
 
 
1
  # Picarones
2
 
3
  > **Plateforme de comparaison de moteurs OCR/HTR pour documents patrimoniaux**
 
1
+ ---
2
+ title: Picarones
3
+ emoji: πŸ“œ
4
+ colorFrom: blue
5
+ colorTo: purple
6
+ sdk: docker
7
+ pinned: false
8
+ ---
9
+
10
  # Picarones
11
 
12
  > **Plateforme de comparaison de moteurs OCR/HTR pour documents patrimoniaux**
app.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ """Point d'entrΓ©e HuggingFace Spaces β€” lance Picarones sur le port 7860."""
2
+ import uvicorn
3
+
4
+ if __name__ == "__main__":
5
+ uvicorn.run("picarones.web.app:app", host="0.0.0.0", port=7860)