Installation
vLLM’s happy path is Linux + an NVIDIA CUDA GPU. Official wheels target Linux; Windows is not natively supported—use a Linux distro inside WSL2. CPU inference, if present at all, is not what this course is for. Without a suitable GPU, use Ollama for local chat.
Python, CUDA minors, and the compute-capability floor change between releases. Treat the table below as the usual story, then check the current GPU install page.
Requirements (happy path)
Confirm the GPU is visible:
You should see a name and driver version. The same command must work inside WSL2 before you install vLLM.
Virtual environment
The project also recommends uv. pip is enough to start:
uv example (check current docs):
Use a fresh environment. vLLM ships compiled CUDA kernels; mixing them with a random conda PyTorch often fails ABI checks.
Install vLLM
Simplest command:
The official GPU page often suggests letting the installer pick a PyTorch CUDA index:
or (example—the CUDA tag will change):
Do not hard-code cu129 in production without re-reading install docs and PyTorch Get Started.
Verify:
If you see serve (some newer builds may say server—check the current CLI), continue to Quick Start.
Windows: WSL2
- Install WSL2 and Ubuntu (or another supported Linux).
- Install a current NVIDIA driver on Windows so
nvidia-smiworks inside WSL. - Create the venv and
pip install vllmin the WSL terminal, not Win32 Python. - Keep the Hub cache on the Linux filesystem (your WSL home), not a
/mnt/c/...path, or downloads crawl.
Unofficial native Windows builds exist; this course does not cover them. Teach and deploy as Linux / WSL2.
Hugging Face cache and tokens
Weights download from the Hub by default. Ungated demos in this course (Qwen 0.5B, OPT-125M) usually need no login. Gated models need:
Never commit tokens. If the Hub is unreachable, vendor a local directory and pass that path as --model.
Other accelerators (awareness only)
Docs also mention AMD ROCm, Intel GPUs, TPUs, and community Apple Silicon (vLLM-Metal). They are not this course’s happy path. Read the matching install page; do not assume pip install vllm on macOS equals the CUDA experience.
Troubleshooting
nvidia-smi sees no device? Fix drivers / WSL GPU first, then Python packages.
CUDA / PyTorch mismatch on import? New venv; do not pip install torch from one CUDA tag and vLLM from another.
CPU only? You can still read the API chapters; do not expect production throughput. Daily chat: Ollama.
Shared memory in containers? See Docker; --ipc=host is common.