跳到主要內容

發表文章

目前顯示的是 10月, 2026的文章

腳本裡 cd 成功,終端機卻沒移動?看懂 Bash 的工作目錄 / Why cd in a Script Does Not Move Your Terminal

目錄怎麼又回去了? / Why did the directory revert? 假設你在 Linux 的 Bash 終端機裡執行一支腳本,裡面明明寫了切換目錄,腳本也沒有報錯,結束後卻還停在原處。這通常不是路徑失靈,而是你把「另一個 shell 的工作目錄」,當成了眼前這個 shell 的狀態。 Imagine running a script in a Bash terminal on Linux. The script changes directory without an error, yet your terminal remains where it started. Usually the path is not broken: you have mistaken another shell’s working directory for the state of your current shell. 工作目錄是程序用來解讀相對路徑的起點,不是整台電腦共用的一個游標。以 bash go.sh 執行腳本時,新的 Bash 會繼承起始目錄;它之後呼叫 cd,只改變自己的工作目錄,並不把變更回寫給啟動它的 shell。[1] The working directory is a process’s starting point for resolving relative paths, not a computer-wide cursor. Running bash go.sh starts another Bash that inherits the initial directory. Its subsequent cd changes its own working directory, without writing that change back to the shell that launched it. [1] 圖一|繼承不等於回寫:腳本結束,外層仍在原處。原創示意圖,非產品或實測截圖。 / Figure 1 | Inheritance is not write-back: the outer shell stays put after the script exits. Original diagram, not a product ...

Docker 容器為什麼不像一台完整電腦?從共用核心看懂隔離 / Why a Docker Container Is Not a Whole Computer

假設你準備接手一個小網站,筆電上已經裝了一套 Python,專案卻需要另一個版本。光想到調整環境,就有點想先去倒杯水。容器吸引人的地方,正是讓應用程式連同需要的檔案一起安排好;不過,這個看起來獨立的小空間,究竟獨立到哪裡? Imagine taking over a small website. Your laptop already has Python installed, but the project needs another version. Just thinking about adjusting the environment might send you off for a glass of water. A container helps by packaging an application with the files it needs. But how independent is this seemingly separate space? 先看看,箱子底下是什麼 / Look beneath the boxes 在一般 Linux 容器的情境裡,容器內可以有自己的應用程式、函式庫與檔案配置,執行時卻共用承載它的 Linux 核心。虛擬機器則可以有自己的客體核心。把兩者都畫成一個方框很方便,卻容易漏掉這個關鍵差別。 [1] In a typical Linux container setup, each container can have its own application, libraries, and filesystem layout while sharing the Linux kernel that runs it. A virtual machine can have its own guest kernel. Drawing both as simple boxes is convenient, but it hides this essential difference. [1] 圖一|先找核心在哪一層,比只看方框更容易理解差異。原創簡化示意圖,非產品截圖。 / Figure 1 | Locate the kernel before comparing the boxes. Original simp...

【實戰指南】NVIDIA GB10 (DGX Spark) 本地 AI Agent:vLLM + Qwen3.8-27B-NVFP4 + Hermes Agent 部署調優 (ZH/EN Guide)

🌐 語言模式 / Language Mode: 中英對照 (Bilingual) 繁體中文 (Chinese) English Only NVIDIA Grace Blackwell GB10 vLLM V1 + NVFP4 + MTP Hermes Autonomous Agent 【實戰指南】在 NVIDIA GB10 (DGX Spark) 從零打造本地 AI Agent:vLLM + Qwen3.8-27B-NVFP4 + Hermes Agent 完整部署與調優 更正說明(2026-11-12): 文中「MTP 投機解碼實測」、13.2 tok/s、+30%、再提升 8% 等數字沒有附上可核對的測量方法、硬體環境紀錄與原始數據, 請視為假設或示例,不是本站實測結果 。121 GB 統一記憶體等硬體規格請以 NVIDIA 官方資料為準。 Correction (2026-11-12): Figures such as “MTP benchmark,” 13.2 tok/s, +30% and +8% were published without a reproducible method or raw records. Treat them as assumptions or illustrations, not measurements by this site. Hardware specs such as 121 GB unified memory should be checked against NVIDIA’s documentation. Building a Local AI Agent on NVIDIA GB10 (DGX Spark): Complete Setup & Tuning Guide for vLLM + Qwen3.8-27B-NVFP4 + Hermes Agent 徹底釋放 121 GB 統一記憶體與 Blackwell SM 12.1 原生 NVFP4 算力——包含 FlashInfe...