跳到正文
GitHub·· 9 天前AI 评分22

Zero to Hero:本地部署 AI 的 Obsidian 知识库

DamienBecherini/ia-on-prem-vault

AI 导读

GitHub 上的 DamienBecherini/ia-on-prem-vault 是《Zero to Hero: On-Premise AI》的 Obsidian 知识库内容,讲解如何在本地私有、快速地运行大规模 AI 模型。

正文

This repository is the Obsidian vault (content) of Zero to Hero: On-Premise AI — a digital garden that explains how to size, deploy, and understand the hardware and software stacks needed to run massive AI models fully locally, private and fast.

Notes are authored in Markdown in Obsidian (wiki links [[...]], templates, Mermaid diagrams) and published as a static site by the starlight-obsidian-engine, to which this vault is attached via a junction. Only the notes live here — no engine code.

Content

  • Foundations — AI physics: memory bandwidth, unified memory vs RAM vs VRAM, KV cache, quantization, prompt journey.
  • Hardware — APUs & unified memory (Strix Halo, Mac), multi-GPU workstations, AI networking (RoCE, InfiniBand, Thunderbolt).
  • Software stack — inference engines (Ollama, vLLM, TensorRT-LLM), clustering (Exo, Ray), RAG & agents, model selection guide.
  • Blueprints — four ready-to-use scenarios from dev lab to enterprise datacenter, with TCO comparison.
  • Agents & assistants — personal assistants (Open WebUI, AnythingLLM, Khoj, Jan AI), custodian agents (OpenHands, Aider, LiteLLM), sovereignty & privacy audit grid.
  • Implementation — getting started with Ollama, evaluating models, securing local inference, multi-GPU vLLM, Prometheus/Grafana monitoring, Ollama → vLLM migration.

Site content is French and English (en/ locale folder). This README is English only (repository documentation).

Vault layout

site.config.json        site manifest for the engine (title, locales, sidebar, social, lexicon)
.env.example            deploy credentials template (copy to .env, never committed)
package.json            vault-local npm scripts (delegate to the engine)
index.mdx               home page (hero)
00-index.md             "Zero to Hero" table of contents
00-lexique/             AI glossary (term pages + hub + generated index)
01-fondations/          ch. 01 — AI physics (FR + en/ mirror)
02-materiel/            ch. 02 — hardware (FR + en/ mirror)
03-stack-logicielle/    ch. 03 — software stack (FR + en/ mirror)
04-blueprints/          ch. 04 — deployment scenarios (FR + en/ mirror)
05-agents-et-assistants-on-prem/  ch. 05 — agents & assistants (FR + en/ mirror)
06-mise-en-oeuvre/      ch. 06 — practical implementation (FR + en/ mirror)
en/                     English locale root (mirrors FR chapters under en/)
scripts/                vault-local maintenance scripts (audit, backfill, delegate)
_templates/             Obsidian templates (_Terme Lexique.md, _Nouveau Chapitre.md)
_private/               confidential notes (gitignored, never published)
.cursor/plans/          Cursor agent plans (gitignored except rules; excluded from publish)
.agents/                agent skills and maintenance (excluded from publish)
.cursor/rules/          Cursor AI rules (tracked; rest of .cursor/ is gitignored)

Lexicon (this vault)

  • Hub : 00-lexique/ai-glossary.md (curated overview).
  • Generated index : 00-lexique/lexicon-index.md (alphabetical table; regen at build when lexicon.enabled in site.config.json).
  • New term : use _templates/_Terme Lexique.md, tag lexique in frontmatter.
  • Regenerate index manually (from the engine repo): npm run lexicon:index (vault is resolved via the src/content/docs junction; no VAULT_PATH needed after npm run link:vault).
  • Commit policy : commit lexicon-index.md with the vault when you add or change lexicon entries.

The engine excludes everything matched by the vault .gitignore (including _private/*) and never builds this root README.md as a site page. See the engine Private / unpublished notes section.

Obsidian

Open this folder as an Obsidian vault.

To preview the site locally, follow the engine README (npm run link:vault then npm run dev in the engine repo).

Publish to the web

Deploy credentials (FTPS or SFTP) belong in this vault's .env (see .env.example). Use the DEPLOY_* variables; pick the protocol with DEPLOY_PROTOCOL.

cp .env.example .env    # ENGINE_PATH + DEPLOY_*
npm run publish         # git + build + incremental upload (FTPS/SFTP)
npm run publish:full    # git + build + full remote scan + upload all + mirror
npm run deploy          # build + incremental upload (no git)
npm run deploy:full     # build + full remote scan + upload all + mirror
npm run upload          # incremental upload only (existing dist/)
npm run upload:full     # full remote scan + upload all + mirror

Incremental deploy uses .deploy-manifest.json (gitignored in this vault) plus a remote copy at {DEPLOY_REMOTE_PATH}/.deploy-manifest.json. The engine merges both before comparing dist/ hashes, so CI and multi-machine deploys stay in sync; only changed files are uploaded after each build.

Add -- --yes to skip the confirmation prompt (e.g. npm run upload:full -- --yes). Do not use npm run upload --full — npm silently consumes flags placed before -- and they never reach the script.

Run npm run audit:links in the engine to list unresolved wiki/MD links (lexicon backlog and link audit allowlist). From this vault you can also run npm run audit:links (delegates to the engine via ENGINE_PATH).

Quality checks

Automated, deterministic checks run on every PR (no LLM agent required). Full reference: docs/quality-checks.md.

npm test                  # CI gate: frontmatter + Mermaid + agent-leaks + i18n strict
npm run audit:frontmatter
npm run audit:mermaid
npm run audit:agent-leaks
npm run audit:i18n:strict
npm run audit:ascii       # warn-only; use audit:ascii:strict to fail
npm run audit:links       # requires ENGINE_PATH in .env

GitHub Actions workflow: .github/workflows/ci.yml.

FR/EN translation drift

After French content changes, list EN mirrors that need updating:

npm run audit:i18n          # default: FR newer than EN by > 7 days
npm run audit:i18n:strict   # any FR newer than EN (translation backlog)

Relies on last_modified frontmatter on FR and EN pairs. Backfill missing dates with npm run backfill:dates:write.

Agent implementation plans live in .cursor/plans/ (Cursor default, not published). Skills and maintenance notes live under .agents/.

To make the site private (Apache Basic Auth), fill in AUTH_* in .env, then:

npm run auth:install    # generate + upload .htaccess + .htpasswd
npm run auth:remove     # make the site public again

Full docs: engine Publishing section.

License

Content in this vault is released under the Creative Commons Attribution 4.0 International (CC BY 4.0) license.
You are free to share and adapt the material for any purpose, including commercially, provided you give appropriate credit to Damien Becherini and link back to the original source.

Third-party content (vendor documentation excerpts, logos, trademarks) remains subject to the respective owners' terms.


来源:GitHub · github.com