Commit 0b186d1
Add Containerized Benchmarking Support for GuideLLM (#123)
# Add Containerized Benchmarking Support for GuideLLM
## Description
This PR adds containerization support for GuideLLM benchmarking, making
it easier to run benchmarks in containerized environments. The changes
include:
1. A new `Dockerfile` that:
- Uses Python 3.11 slim as the base image
- Installs necessary dependencies, including git and curl
- Sets up a non-root user for security
- Includes healthcheck functionality
- Properly configures the benchmark script
2. A new `run_benchmark.sh` script that:
- Provides a flexible way to run benchmarks with configurable parameters
- Supports environment variable overrides for customization
- Handles different output formats (json, yaml)
- Includes proper error handling and logging
## Testing
The container can be built and tested using:
```bash
docker build -t <container-image-repo>/guidellm-benchmark:latest .
docker run -e TARGET="http://localhost:8000" -e MODEL="neuralmagic/Meta-Llama-3.1-8B-Instruct-quantized.w4a16" <container-image-repo>/guidellm-benchmark:latest
```
## Configuration Options
The container supports the following environment variables:
- `TARGET`: The target endpoint for benchmarking (default:
http://localhost:8000)
- `MODEL`: The model to benchmark (default:
neuralmagic/Meta-Llama-3.1-8B-Instruct-quantized.w4a16)
- `RATE_TYPE`: The rate type for benchmarking (default: sweep)
- `DATA`: The data configuration (default:
prompt_tokens=256,output_tokens=128)
- `MAX_REQUESTS`: Maximum number of requests (default: 100)
- `MAX_SECONDS`: Maximum duration in seconds
- `OUTPUT_PATH`: Path for output files (default:
/results/guidellm_benchmark_results)
- `OUTPUT_FORMAT`: Output format (json, yaml, or yml)
## Security Considerations
- Uses a non-root user for running the benchmark
- Includes proper file permissions
- Implements healthcheck for container monitoring
- Follows container security best practices
## Related Issues
- Closes #119
- Closes #111
## Checklist
- [x] Added Dockerfile with proper security configurations
- [x] Added run_benchmark.sh script with environment variable support
- [x] Added documentation for configuration options
- [x] Tested container build and run
- [x] Followed security best practices
---------
Co-authored-by: Samuel Monson <[email protected]>1 parent d401ebd commit 0b186d1
2 files changed
+91
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
0 commit comments