Spaces:
Sleeping
Sleeping
Commit History
-
fix(deploy): point Space at public model repos
GitHub Copilot4871d44
-
fix(deploy): don't bake models into image, download from HF Hubβ
The COPY models/ line failed in HF Spaces because models/ is gitignored (it's 2 GB of weights). resolve_model_path() already handles the owner/repo case via from_pretrained β when GUICHETOI_*_DIR is an HF Hub ID and not a local path, transformers downloads automatically. Also add DataSet/ to .dockerignore (same gap that bit .gitignore). Render flow note: if baked-in models are wanted there for faster boot, re-add the COPY behind a build arg or a separate Dockerfile. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>7f6dc6d
-
feat(deploy): Render blueprint + GHCR release flow for the ML serviceβ
Adds the wiring to deploy the Python ML service as a Render Private Service behind Spring Boot. Topology: Angular (Static Site) β Spring Boot (Web Service) β guichetoi-ml (pserv) The private service has no public URL β only Spring Boot can reach it at http://guichetoi-ml:10000. No CORS, no public attack surface. Why GHCR instead of Render's auto-build: models/ is gitignored (~2 GB of LayoutLMv3 weights), so the GitHub runner can't produce a complete image. `make release` builds locally (where models/ exists) and pushes to GHCR. Render pulls from there. Files: render.yaml One-pserv blueprint. Pro plan required (2 GB RAM β LayoutLMv3 holds ~1.2 GB resident; Starter OOMs). Pulls ghcr.io/medaziz012/guichetoi-ml:latest, polls /health, autoDeploy: true on :latest tag updates. Dockerfile CMD switched to shell form so PORT expands at runtime. PORT defaults to 8000 locally; Render injects 10000. β¦9452c00
-
chore: wire Dockerfile, Makefile, README, gitignore to the new layoutβ
Dockerfile - COPY src/ ./src/ (was: COPY 4_inference.py 6_recommendation_engine.py β¦) - COPY assets/label_mappings.json (was: data2/label_mappings.json) - + pip install --no-deps -e . so uvicorn can resolve guichetoi.api.main - CMD updated: uvicorn guichetoi.api.main:app .dockerignore - Excludes apps/, scripts/, tools/, tests/, docs/, .github/, CONTRIBUTING.md - data2/ now broadly ignored (label_mappings moved to assets/) - Drops obsolete dev-script names (debug_*, find_*, etc. now under tools/) Makefile - help text updated to reflect new tree (181 tests; api & docker targets) - demo: streamlit run apps/streamlit_demo.py - + api target: uvicorn guichetoi.api.main:app - + docker target: docker build -t guichetoi-ml . - lint: ruff + mypy against src/ - install: pip install -e .[dev,ui] + requirements.txt pins - removed broken `audit` target (referenced a non-existent worktree path) .gitignore - drop `!data2/label_mappings.json` exception (file now lives iβ¦9203c28 -
Add FastAPI service for Spring Boot / Angular deploymentβ
Wraps the inference pipeline, recommendation engine, and CMS generator behind a small REST API designed to sit behind a Spring Boot backend serving an Angular 17 frontend. Routes: GET /health readiness probe (true once pipeline is loaded) GET /metadata doc classes + field labels + icons for the UI POST /analyze multipart upload (files or ZIP) β verdict JSON POST /cms verdict JSON β xlsx bytes + X-CMS-Warnings header POST /cms/preview verdict JSON β human-readable summary dict Auto-generated OpenAPI 3.1 spec at /openapi.json β Spring Boot can consume it via openapi-generator to produce a typed WebClient. Dockerfile bakes models into a python:3.12-slim image with tesseract-fra, runs a single uvicorn worker (the LayoutLMv3 pipeline keeps ~1.2 GB resident β scale horizontally with replicas, not workers). .dockerignore keeps customer data, training scripts, dev utilities, and docs out of the build context. requirements.txt: + fastapi 0.117β¦01211a2