Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:LMCache LMCache Disagg Prerequisite Checks

From Leeroopedia


Knowledge Sources
Domains Infrastructure, Deployment
Last Updated 2026-02-09 00:00 GMT

Overview

Concrete tool for validating disaggregated prefill deployment prerequisites provided by the LMCache example scripts.

Description

The disagg_example_1p1d.sh script performs prerequisite checks including GPU count verification via nvidia-smi, Python package import tests, and HuggingFace token validation. This is a Pattern Doc documenting the expected validation interface.

Usage

Run the orchestration script before deploying disaggregated prefill. It will abort with clear error messages if prerequisites are not met.

Code Reference

Source Location

  • Repository: LMCache
  • File: examples/disagg_prefill/1p1d/disagg_example_1p1d.sh
  • Lines: L1-L50

Signature

#!/bin/bash
# Prerequisite checks:
# 1. Check GPU count >= 2
# 2. Check Python packages: lmcache, vllm, nixl, zmq, httpx
# 3. Check HF_TOKEN environment variable
# 4. Set MODEL variable (default: meta-llama/Llama-3.1-8B-Instruct)

Import

# Run directly as shell script
bash examples/disagg_prefill/1p1d/disagg_example_1p1d.sh

I/O Contract

Inputs

Name Type Required Description
HF_TOKEN env var Yes HuggingFace authentication token
NVIDIA GPUs hardware Yes Minimum 2 GPUs for 1P1D deployment
Python packages software Yes lmcache, vllm, nixl, zmq, httpx must be importable

Outputs

Name Type Description
validation result exit code 0 if all checks pass, non-zero on failure

Usage Examples

Manual Prerequisite Check

# Check GPU count
GPU_COUNT=$(nvidia-smi --query-gpu=name --format=csv,noheader | wc -l)
if [ "$GPU_COUNT" -lt 2 ]; then
    echo "Error: Need at least 2 GPUs, found $GPU_COUNT"
    exit 1
fi

# Check Python packages
python -c "import lmcache; import vllm; import nixl; import zmq; import httpx"

Related Pages

Implements Principle

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment