You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0b36773
Browse filesBrowse the repository at this point in the historyBrowse files
If you intend to run inference benchmarks using the Docker fallback strategy, you must install Docker Engine and the NVIDIA Container Toolkit.
76
+
If you intend to run inference benchmarks using the container fallback strategy, you must install a container runtime and the NVIDIA Container Toolkit. Choose the runtime with `--runtime` (default `docker`):
54
77
55
78
```bash
79
+
# Docker (default)
56
80
ai-studio-cli setup vllm
81
+
82
+
# Podman — installs podman + podman-compose and generates a CDI spec
83
+
ai-studio-cli setup vllm --runtime podman
84
+
85
+
# Both
86
+
ai-studio-cli setup vllm --runtime both
57
87
```
58
88
59
89
---
@@ -114,7 +144,7 @@ The `bench` subcommand provides an automated way for testing LLM serving perform
114
144
115
145
### Quick Start — Zero-Config Benchmark
116
146
117
-
The CLI comes bundled with a default, optimized `docker-compose.yaml` (configured for `Qwen2.5-32B-Instruct` with FP8 and PP-4 and TP-1). If you don't provide a compose file, it will use this default automatically:
147
+
The CLI comes bundled with a default, optimized compose file (configured for `Qwen2.5-32B-Instruct` with FP8 and PP-4 and TP-1). If you don't provide a compose file, it will use this default automatically:
118
148
119
149
```bash
120
150
# Simplest case — uses the built-in default compose
The `bench`, `ab-bench`, and `vllm` commands work with either runtime. By default the runtime is **auto-detected** (Docker preferred, then Podman); override it with `--runtime`:
160
+
161
+
```bash
162
+
# Force Podman — uses podman-compose and CDI device passthrough
Under Podman the bundled compose file is automatically adapted (the GPU `deploy.resources` reservation is rewritten to the CDI `devices: [nvidia.com/gpu=all]` form, which `podman-compose` understands). If you supply your *own*`--compose-file` for Podman, use the CDI device syntax yourself.
167
+
127
168
To keep the server running after the benchmark (e.g., for follow-up runs):
Before running benchmarks with the built-in vLLM server, ensure you have **Docker Engine** and the **NVIDIA Container Toolkit** installed on your system.
184
+
Before running benchmarks with the built-in vLLM server, ensure you have a container runtime (**Docker Engine**or **Podman** + `podman-compose`) and the **NVIDIA Container Toolkit** installed. Run `ai-studio-cli setup vllm --runtime <docker|podman|both>` to install them.
The benchmarking tool automatically determines the best way to run the test:
194
235
1.**Local Execution**: If `vllm` is installed locally in your Python environment (e.g., via `pip install vllm`), it will run the benchmark natively to avoid overhead.
195
-
2.**Docker Fallback**: If `vllm` is missing (common on fresh nodes), it automatically falls back to pulling and running the `vllm/vllm-openai:latest` Docker image. The Docker container uses host networking to reach your inference server.
236
+
2.**Container Fallback**: If `vllm` is missing (common on fresh nodes), it automatically falls back to pulling and running the `vllm/vllm-openai:latest`image with the active runtime (Docker or Podman, per `--runtime`). The benchmark client container uses host networking to reach your inference server (no GPU is requested — the client is a plain load generator).
Copy file name to clipboardExpand all lines: ai-studio-cli/cmd/ab_bench.go
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,8 @@ func init() {
65
65
abBenchCmd.Flags().IntVar(&abRequests, "requests", 1000, "Total number of requests to send (-n)")
66
66
abBenchCmd.Flags().StringVar(&abOutputFile, "output", "", "Write ab gnuplot output to this file (ab -g flag); empty = skip")
67
67
abBenchCmd.Flags().StringArrayVar(&abExtraArgs, "ab-arg", nil, "Additional raw argument for ab; can be repeated (advanced: do not interpolate untrusted input)")
68
-
abBenchCmd.Flags().StringVar(&abComposeFile, "compose-file", "", "Path to a custom docker-compose.yml; uses bundled default if server is unreachable and this is unset")
68
+
abBenchCmd.Flags().StringVar(&abComposeFile, "compose-file", "", "Path to a custom compose file; uses bundled default if server is unreachable and this is unset")
69
+
abBenchCmd.Flags().StringVar(&containerRuntime, "runtime", "auto", "Container engine: auto, docker, or podman")
69
70
abBenchCmd.Flags().BoolVar(&abKeepServer, "keep-server", false, "Leave the vLLM server running after the benchmark completes")
70
71
abBenchCmd.Flags().IntVar(&abServerTimeout, "server-timeout", 900, "Maximum seconds to wait for the vLLM server to become ready (default allows for large model load times)")
cmd.Flags().StringArrayVar(&r.additionalArgs, "vllm-arg", nil, "Additional raw argument for vllm bench serve; can be repeated (advanced: do not interpolate untrusted input)")
97
97
cmd.Flags().StringVar(&r.gpuTag, "gpu-tag", "", "GPU tag for structured result path (auto-detected if empty)")
98
98
// Server lifecycle flags
99
-
cmd.Flags().StringVar(&r.server.vllmImage, "vllm-image", "vllm/vllm-openai:latest", "Docker image to use for benchmarking if vllm is not installed locally")
100
-
cmd.Flags().StringVar(&r.server.composeFile, "compose-file", "", "Path to a custom docker-compose.yml; uses bundled default if server is unreachable and this is unset")
99
+
cmd.Flags().StringVar(&containerRuntime, "runtime", "auto", "Container engine: auto, docker, or podman")
100
+
cmd.Flags().StringVar(&r.server.vllmImage, "vllm-image", "vllm/vllm-openai:latest", "Container image to use for benchmarking if vllm is not installed locally")
101
+
cmd.Flags().StringVar(&r.server.composeFile, "compose-file", "", "Path to a custom compose file; uses bundled default if server is unreachable and this is unset")
101
102
cmd.Flags().BoolVar(&r.server.keepServer, "keep-server", false, "Leave the vLLM server running after the benchmark completes")
102
103
cmd.Flags().IntVar(&r.server.timeoutSec, "server-timeout", 900, "Maximum seconds to wait for the vLLM server to become ready (default allows for large model load times)")
0 commit comments