Koopa.ai Agentic AI Architect Calendar Contact

Delivery calendar

The AI server rebuilt on Ubuntu as enterprise infrastructure

Delivered · 25 Jun 2026

On 25 June 2026 the AI machine was wiped and rebuilt from bare metal. Windows and WSL came out and Ubuntu Server went straight onto the hardware: about 30% better performance, both GPUs fully used, one secured front door, full monitoring, and a platform a whole team can run and recover.

AI 服务器在 Ubuntu 上重建为企业级基础设施

交付日期 · 2026 年 6 月 25 日

2026 年 6 月 25 日,这台 AI 机器被清空,从裸机重新搭建。拿掉 Windows 和 WSL,Ubuntu Server 直接装在硬件上:性能提升约 30%,两张 GPU 全部用上,只有一个受保护的入口,监控齐全,整个团队都能运维和恢复。

AI 伺服器在 Ubuntu 上重建為企業級基礎架構

交付日期 · 2026 年 6 月 25 日

2026 年 6 月 25 日,這台 AI 機器被清空,從裸機重新建置。拿掉 Windows 和 WSL,Ubuntu Server 直接裝在硬體上:效能提升約 30%,兩張 GPU 全部用上,只有一個受保護的入口,監控齊全,整個團隊都能維運和復原。

DeliveryInfrastructureLocal LLMSecurity

The new infrastructure, in seven scenes · press ▶ Play the tour, or pick a scene新的基础设施,分七幕讲解 · 按“▶ 播放讲解”,或直接点选某一幕新的基礎架構,分七幕講解 · 按「▶ 播放講解」,或直接點選某一幕

Open full screen ↗全屏打开 ↗全螢幕開啟 ↗

At a glance

Performance+30%compared with the Windows and WSL setup
Fully used2GPUsone chat model split across both cards
Front door1doorHTTPS in, everything else closed
Local inference100%no cloud model, no per-token bill
Always on3modelschat, vision/OCR and embeddings
Handover documents5guidesso anyone on the team can run it

Why rebuild

The first platform ran on Windows with Linux inside it (WSL). It proved people would use a private AI, but it had an extra layer between the models and the GPUs, could not use both GPUs to the full, and depended on one person knowing how it was put together. The rebuild turns it into infrastructure: faster, safer, observable and documented.

What was built

  • Platform: Ubuntu Server on the hardware, the NVIDIA driver and container toolkit, and every service in its own Docker container on one private network.
  • Model serving: vLLM runs the main chat model across both GPUs, with a vision/OCR model and an embedding model sharing the cards beside it. All three are always on.
  • On-demand models: larger and specialised models load only when called. An in-house service, swap-proxy, starts the one that is needed and makes room for it, through a Docker control channel that can only start and stop containers.
  • One gateway: Nginx is the single HTTPS front door and LiteLLM gives every client one OpenAI-compatible API, so applications never depend on a particular model server.
  • Security: default-deny firewall, key-only SSH with automatic banning, a private VPN for maintenance, single sign-on for the operator screens, internal-only model servers and database, an endpoint protection agent, and web access limited to the company network.
  • Monitoring: Prometheus, Grafana and Alertmanager cover the host, GPUs, containers, database, gateway and model servers, with email alerts.
  • Operations: an Operations Hub for staff, a Control Tower console to start and stop models without SSH, staged changes with backups of every edit, a two-layer backup, and an updater with one-key rollback.
  • RAG store: PostgreSQL with pgvector, ready for document search by meaning.
  • Five documents: architecture handover, build and recovery guide, component field guide, console reference, and operations and offboarding.

How a request travels

  1. A person or an application sends a request over HTTPS.
  2. Nginx accepts it at the front door; browser users sign in with the company login, applications present an API key.
  3. LiteLLM picks the model that was asked for.
  4. An always-on model answers at once from the GPUs; an on-demand model is started first by swap-proxy.
  5. The answer streams back the same way, and every step shows up on the dashboards.

Why it matters

The same hardware now does more work, faster, and it is no longer a one-person machine. It can be audited, monitored, updated, handed over and rebuilt from documents. Everything that came after, from the agent consoles to the SAP and Power BI work, runs on this foundation.

Stack

Ubuntu ServerDockerNVIDIA Container ToolkitvLLMllama.cppLiteLLMNginxoauth2-proxyPostgreSQLpgvectorPrometheusGrafanaAlertmanagerUFWfail2banNext.jsFastAPI

一眼看懂

性能+30%相比原来的 Windows 加 WSL 环境
全部用上2张 GPU一个对话模型拆在两张卡上跑
唯一入口1个入口只开 HTTPS,其余全部关闭
本地推理100%不用云端模型,没有按 token 计费
常驻待命3个模型对话、视觉/OCR 和向量
交接文档5份文档团队里任何人都能接手

为什么要重建

第一版平台跑在 Windows 上,Linux 是装在里面的(WSL)。它证明了大家愿意用私有 AI,但模型和 GPU 之间多了一层,两张 GPU 没法完全用上,而且只有一个人清楚它是怎么搭起来的。这次重建把它变成真正的基础设施:更快、更安全、看得见、有文档。

搭建了什么

  • 平台:Ubuntu Server 直接装在硬件上,配好 NVIDIA 驱动和容器工具包,每个服务各自一个 Docker 容器,都在同一个私有网络里。
  • 模型服务:vLLM 把主要的对话模型拆在两张 GPU 上跑,视觉/OCR 模型和向量模型分别共用其中一张。三个模型全部常驻。
  • 按需模型:更大、更专门的模型只在被调用时才加载。自研的 swap-proxy 负责启动需要的模型并给它腾出空间,它用的 Docker 控制通道只能启动和停止容器。
  • 统一网关:Nginx 是唯一的 HTTPS 入口,LiteLLM 给所有客户端提供同一套兼容 OpenAI 的 API,应用不依赖某一台具体的模型服务。
  • 安全:防火墙默认拒绝;SSH 只认密钥,并自动封禁;维护走私有 VPN;运维界面要单点登录;模型服务和数据库只在内部监听;主机有终端防护代理;网页访问只限公司网络。
  • 监控:Prometheus、Grafana 和 Alertmanager 覆盖主机、GPU、容器、数据库、网关和模型服务,并有邮件告警。
  • 运维:给同事用的 Operations Hub;不用 SSH 就能启停模型的 Control Tower 控制台;改动先暂存、每次修改都留备份;两层备份;带一键回滚的更新器。
  • RAG 知识库:PostgreSQL 加 pgvector,可以按意思检索文档。
  • 五份文档:架构交接、搭建与恢复指南、组件手册、控制台参考、运维与离职交接。

一个请求怎么走

  1. 人或应用通过 HTTPS 发出请求。
  2. Nginx 在入口接收;用浏览器的人用公司账号登录,应用出示 API 密钥。
  3. LiteLLM 选出被点名的模型。
  4. 常驻模型立刻用 GPU 作答;按需模型则先由 swap-proxy 启动。
  5. 答案沿原路流式返回,每一步都会出现在监控看板上。

为什么重要

同样的硬件,现在干得更多、更快,也不再是只有一个人懂的机器。它可以被审计、监控、更新、交接,也能照着文档重建。之后的一切,从智能体控制台到 SAP 和 Power BI 的工作,都跑在这个基础上。

技术栈

Ubuntu ServerDockerNVIDIA Container ToolkitvLLMllama.cppLiteLLMNginxoauth2-proxyPostgreSQLpgvectorPrometheusGrafanaAlertmanagerUFWfail2banNext.jsFastAPI

一眼看懂

效能+30%相比原來的 Windows 加 WSL 環境
全部用上2張 GPU一個對話模型拆在兩張卡上跑
唯一入口1個入口只開 HTTPS,其餘全部關閉
本地推論100%不用雲端模型,沒有按 token 計費
常駐待命3個模型對話、視覺/OCR 和向量
交接文件5份文件團隊裡任何人都能接手

為什麼要重建

第一版平台跑在 Windows 上,Linux 是裝在裡面的(WSL)。它證明了大家願意用私有 AI,但模型和 GPU 之間多了一層,兩張 GPU 沒辦法完全用上,而且只有一個人清楚它是怎麼搭起來的。這次重建把它變成真正的基礎架構:更快、更安全、看得見、有文件。

建置了什麼

  • 平台:Ubuntu Server 直接裝在硬體上,配好 NVIDIA 驅動和容器工具組,每個服務各自一個 Docker 容器,都在同一個私有網路裡。
  • 模型服務:vLLM 把主要的對話模型拆在兩張 GPU 上跑,視覺/OCR 模型和向量模型分別共用其中一張。三個模型全部常駐。
  • 隨需模型:更大、更專門的模型只在被呼叫時才載入。自行開發的 swap-proxy 負責啟動需要的模型並替它騰出空間,它用的 Docker 控制通道只能啟動和停止容器。
  • 統一閘道:Nginx 是唯一的 HTTPS 入口,LiteLLM 給所有用戶端提供同一套相容 OpenAI 的 API,應用不依賴某一台特定的模型服務。
  • 安全:防火牆預設拒絕;SSH 只認金鑰,並自動封鎖;維護走私有 VPN;維運介面要單一登入;模型服務和資料庫只在內部監聽;主機有端點防護代理程式;網頁存取只限公司網路。
  • 監控:Prometheus、Grafana 和 Alertmanager 涵蓋主機、GPU、容器、資料庫、閘道和模型服務,並有郵件告警。
  • 維運:給同事用的 Operations Hub;不用 SSH 就能啟停模型的 Control Tower 主控台;變更先暫存、每次修改都留備份;兩層備份;帶一鍵回復的更新器。
  • RAG 知識庫:PostgreSQL 加 pgvector,可以依語意搜尋文件。
  • 五份文件:架構交接、建置與復原指南、元件手冊、主控台參考、維運與離職交接。

一個請求怎麼走

  1. 人或應用透過 HTTPS 送出請求。
  2. Nginx 在入口接收;用瀏覽器的人用公司帳號登入,應用出示 API 金鑰。
  3. LiteLLM 選出被指定的模型。
  4. 常駐模型立刻用 GPU 作答;隨需模型則先由 swap-proxy 啟動。
  5. 答案沿原路串流返回,每一步都會出現在監控儀表板上。

為什麼重要

同樣的硬體,現在做得更多、更快,也不再是只有一個人懂的機器。它可以被稽核、監控、更新、交接,也能照著文件重建。之後的一切,從代理主控台到 SAP 和 Power BI 的工作,都跑在這個基礎上。

技術堆疊

Ubuntu ServerDockerNVIDIA Container ToolkitvLLMllama.cppLiteLLMNginxoauth2-proxyPostgreSQLpgvectorPrometheusGrafanaAlertmanagerUFWfail2banNext.jsFastAPI

(07) Contact

Let's talk