// published:

Surviving vLLM Setup in Tricky Lab Environments


If you are to deploy vLLM in a lab environment, the easiest way to setup your environment with conda is the one-liner command. It promises that installing an editable build with precompiled CUDA binaries is as simple as running this:

VLLM_USE_PRECOMPILED=1 pip install --editable .

On a pristine, internet-connected personal workstation with perfectly aligned NVIDIA drivers, this command works well. It skips the massive C++ compilation step, automatically detects your hardware, fetches the correct pre-built wheel, and lets you immediately start hacking on your code.

But in the real world of lab clusters in China, the Golden One-Liner always fail. When you transition from a local machine to heterogeneous lab environment, that simple command will fail in spectacular ways. Here is how a one-line expectation turns into a multi-hour debugging gauntlet, and how to engineer a robust deployment pipeline to survive it.

The Lab Server Landscape: A Recipe for Chaos

A tricky environment I recently worked on is as below:

  1. The Jump Server (Head Node): Has internet access, but absolutely zero physical GPUs.
  2. The Compute Node: A powerful machine equipped with H20 GPUs running CUDA 12.8, but strictly air-gapped with no internet access.
  3. The Bridge: Both machines share a /home directory via an NFS network drive.

And, like most machines in China, it cannot access huggingface or github directly.

Because the jump server has no GPU, the installer cannot dynamically detect the CUDA version and instead defaults to the latest available wheel (CUDA 13). When you move that installation to the air-gapped H20 compute node (running CUDA 12.8), the engine crashes on startup with ImportError: libcudart.so.X: cannot open shared object file.

Engineering the Escape Hatch: The Survival Commands

To bridge the gap between the clean one-liner ideal and the messy reality of jump servers, you have to replace standard pip commands with defensive shell commands. Here is the exact command sequence to bypass network restrictions, force version alignments, and configure offline execution.

Bypass Network Restrictions

To accelerate pip downloads, set a reliable mirror:

# Set a fast mirror for pip downloads
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

The Aliyun mirror is not as reliable! In my case, it failed to provide regex.

Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
ERROR: Could not find a version that satisfies the requirement regex (from versions: none)
ERROR: No matching distribution found for regex

The vLLM installer needs to run git fetch to find the correct upstream commit for the precompiled wheels. If your university network restricts outbound GitHub connections, the installation will permanently hang. Route it through a mirror:

git config --global url."https://ghfast.top/https://github.com/".insteadOf "https://github.com/"

Pin CUDA Version

Do not let the installer guess your CUDA version on a GPU-less head node. Explicitly define the PyTorch and vLLM target versions. If your compute node runs CUDA 12.8, use the backward-compatible cu129 wheels. (Note: vLLM does not host a wheel for every CUDA version; cu129 acts as the fallback for the entire 12.x family).

# Force PyTorch to pull the CUDA 12.9 backward-compatible wheel
pip install torch==2.11.0 torchvision==0.26.0 torchaudio==2.11.0 --index-url https://download.pytorch.org/whl/cu129

# Force vLLM to fetch the matching cu129 precompiled binaries
export VLLM_MAIN_CUDA_VERSION=12.9
VLLM_USE_PRECOMPILED=1 pip install --editable .

Pre-cache Models for the Air-Gapped Node

Because the compute node cannot access the internet, use the jump server to download the required models directly into the shared NFS cache:

export HF_ENDPOINT=https://hf-mirror.com
export HF_HUB_DISABLE_XET=1  # Disable XET
hf download Qwen/Qwen2.5-7B-Instruct

Force Offline Execution on the Compute Node

When you finally activate the environment on the air-gapped GPU machine, the transformers library will still try to ping the internet to check for metadata updates, causing the script to hang. You must explicitly silence the network calls:

export HF_HUB_OFFLINE=1
export TRANSFORMERS_OFFLINE=1
python launch_inference.py --model Qwen/Qwen2.5-7B-Instruct

The V100 Tragedy: Know Your Hardware Limits

I attempted to deploy a modern LLM serving pipeline on an older V100 node. It failed to run the latest version of pytorch.

The V100 uses the Volta architecture (compute capability sm_70). Modern vLLM releases have entirely dropped sm_70 support because the architecture cannot natively run bfloat16 instructions or utilize FlashAttention-2.

The Command to Check: Before you install anything, verify your GPU’s compute capability. If it returns 7.0, you cannot run modern vLLM efficiently.

nvidia-smi --query-gpu=compute_cap --format=csv

The one-liner is fantastic for standard environments. However, when deploying across restricted, heterogeneous lab nodes, relying on hardcoded overrides and explicit offline caching is the only way to actually get back to writing code.

Prev: Chrome DevTools Are Useful Even if You Are Not a Dev
Next: Why Decoding is memory-bound for LLMs and how to optimize it