一键导入
vllm-deployment
Deploy vLLM for high-performance LLM inference. Covers Docker CPU/GPU deployments and cloud VM provisioning with OpenAI-compatible API endpoints.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Deploy vLLM for high-performance LLM inference. Covers Docker CPU/GPU deployments and cloud VM provisioning with OpenAI-compatible API endpoints.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Systematic process for analyzing and modernizing legacy applications to comply with the 12-Factor App methodology. Covers code analysis, configuration externalization, dependency management, and container/Kubernetes best practices.
Backup and recovery solution for K3s clusters. Includes scheduled, pre-shutdown, and manual backup strategies with recovery procedures.
Configure high-availability load balancing with HAProxy and NGINX reverse proxies. Covers health checks, automatic failover, sticky sessions, and stats monitoring for containerized backends.
Deploy serverless applications on Cloudflare Workers. Covers project setup, JavaScript handler patterns, routing, deployment with Wrangler, and API token configuration. Suitable for APIs, proxies, edge computing, and request transformation.
Deploy containerized applications to AWS EC2 and expose them publicly via Cloudflare Tunnel with automatic HTTPS. Eliminates need for load balancers, SSL certificates, or public inbound ports.
Guide for using Beads (bd), a dependency-aware issue tracker for AI agents. Issues chained together like beads.
基于 SOC 职业分类
| name | vllm-deployment |
| description | Deploy vLLM for high-performance LLM inference. Covers Docker CPU/GPU deployments and cloud VM provisioning with OpenAI-compatible API endpoints. |
| license | MIT |
| tags | ["vllm","llm","inference","gpu","ai","machine-learning","docker","openai-api"] |
| metadata | {"author":"Stakpak <team@stakpak.dev>","version":"1.0.3"} |
docker run --rm -p 8000:8000 \
--shm-size=4g \
--cap-add SYS_NICE \
--security-opt seccomp=unconfined \
-e VLLM_CPU_KVCACHE_SPACE=4 \
<vllm-cpu-image> \
--model <model-name> \
--dtype float32
# Access: http://localhost:8000
docker run --rm -p 8000:8000 \
--gpus all \
--shm-size=4g \
<vllm-gpu-image> \
--model <model-name>
# Access: http://localhost:8000
| Hardware | Minimum RAM | Recommended |
|---|---|---|
| CPU | 2x model size | 4x model size |
| GPU | Model size + 2GB | Model size + 4GB VRAM |
# CPU image (check vLLM docs for latest tag)
docker pull <vllm-cpu-image>
# GPU image (check vLLM docs for latest tag)
docker pull <vllm-gpu-image>
Notes:
CPU Deployment:
docker run --rm \
--shm-size=4g \
--cap-add SYS_NICE \
--security-opt seccomp=unconfined \
-p 8000:8000 \
-e VLLM_CPU_KVCACHE_SPACE=4 \
-e VLLM_CPU_OMP_THREADS_BIND=0-7 \
<vllm-cpu-image> \
--model <model-name> \
--dtype float32 \
--max-model-len 2048
GPU Deployment:
docker run --rm \
--gpus all \
--shm-size=4g \
-p 8000:8000 \
<vllm-gpu-image> \
--model <model-name> \
--dtype auto \
--max-model-len 4096
# Check health
curl http://localhost:8000/health
# List models
curl http://localhost:8000/v1/models
# Test inference
curl http://localhost:8000/v1/completions \
-H "Content-Type: application/json" \
-d '{"model": "<model-name>", "prompt": "Hello", "max_tokens": 10}'
docker pull <vllm-image>
docker stop <container-id>
# Re-run with same parameters
# Create security group with rules:
# - TCP 22 (SSH)
# - TCP 8000 (API)
# Launch instance with:
# - Sufficient RAM/VRAM for model
# - Docker pre-installed (or install manually)
# - 50-100GB root volume
# - Public IP for external access
ssh -i <key-file> <user>@<instance-ip>
# Install Docker if not present
# Pull and run vLLM container (see Docker Deployment section)
# From local machine
curl http://<instance-ip>:8000/health
curl http://<instance-ip>:8000/v1/models
# Stop container
docker stop <container-id>
# Terminate instance to stop costs
# Delete associated resources (volumes, security groups) if temporary
| Variable | Purpose | Example |
|---|---|---|
VLLM_CPU_KVCACHE_SPACE | KV cache size in GB (CPU) | 4 |
VLLM_CPU_OMP_THREADS_BIND | CPU core binding (CPU) | 0-7 |
CUDA_VISIBLE_DEVICES | GPU device selection | 0,1 |
HF_TOKEN | HuggingFace authentication | hf_xxx |
| Flag | Purpose |
|---|---|
--shm-size=4g | Shared memory for IPC |
--cap-add SYS_NICE | NUMA optimization (CPU) |
--security-opt seccomp=unconfined | Memory policy syscalls (CPU) |
--gpus all | GPU access |
-p 8000:8000 | Port mapping |
| Argument | Purpose | Example |
|---|---|---|
--model | Model name/path | <model-name> |
--dtype | Data type | float32, auto, bfloat16 |
--max-model-len | Max context length | 2048 |
--tensor-parallel-size | Multi-GPU parallelism | 2 |
| Endpoint | Method | Purpose |
|---|---|---|
/health | GET | Health check |
/v1/models | GET | List available models |
/v1/completions | POST | Text completion |
/v1/chat/completions | POST | Chat completion |
/metrics | GET | Prometheus metrics |
| Issue | Solution |
|---|---|
| Container exits immediately | Increase RAM or use smaller model |
| Slow inference (CPU) | Verify OMP thread binding configuration |
| Connection refused externally | Check firewall/security group rules |
| Model download fails | Set HF_TOKEN for gated models |
| Out of memory during inference | Reduce max_model_len or batch size |
| Port already in use | Change host port mapping |
| Warmup takes too long | Normal for large models (1-5 min) |