Add Containerized Benchmarking Support for GuideLLM#123
Add Containerized Benchmarking Support for GuideLLM#123markurtz merged 12 commits intovllm-project:mainfrom
Conversation
|
Could you put these files under a |
markurtz
left a comment
There was a problem hiding this comment.
Let some comments throughout. Additionally, I know we had a request to move it to build/, but this is a commonly named folder that python and potential future builds will use.
I've generally seen the parent folder be docker/ at the root and then different python versions could be either nested folders under that with a Dockerfile or multiple Dockerfiles a the root with extensions of the python version such as Dockerfile.py39
build/Dockerfile
Outdated
| FROM python:3.12-slim | ||
|
|
||
| LABEL org.opencontainers.image.source="https://github.com/neuralmagic/guidellm" | ||
| LABEL org.opencontainers.image.description="GuideLLM Benchmark Container" |
There was a problem hiding this comment.
NIT: can we remove the benchmark from this so we keep it flexible towards future goals of evals and things like that?
There was a problem hiding this comment.
I think benchmark is a neutral term for both performance and evaluations.
build/run_benchmark.sh
Outdated
| @@ -0,0 +1,35 @@ | |||
| #!/usr/bin/env bash | |||
There was a problem hiding this comment.
See note on the entrypoint for the Dockerfile, I'd like to see if we can remove this script fully or make it optional to package in
There was a problem hiding this comment.
In latest version, the entrypoint will fall back to executing unwrapped guidellm if anything is set in CMD. The entrypoint is now mostly a stopgap until scenarios with env support land.
There was a problem hiding this comment.
Pull Request Overview
This pull request adds containerized benchmarking support for GuideLLM by introducing a new Dockerfile (Containerfile) and an entrypoint script to run benchmarks with configurable parameters in a containerized environment.
- Added a container entrypoint shell script to parse GUIDELLM_ environment variables and build the benchmark command.
- Created a Containerfile that sets up a multi-stage build with a virtual environment, installs the GuideLLM package, and configures a non-root user with proper security settings.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| build/entrypoint.sh | Introduces the shell script to execute the benchmarking command with GUIDELLM_ parameters. |
| build/Containerfile | Provides the multi-stage Docker build configuration and security setup for the benchmark. |
Comments suppressed due to low confidence (1)
build/Containerfile:1
- The Containerfile specifies Python 3.13 while the PR description mentions Python 3.11 slim. Consider aligning the Python version in the Dockerfile with the documentation to avoid confusion.
ARG PYTHON=3.13
…arking fix pre-commit issue? Add Docker build files and update .gitignore
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:
A new
Dockerfilethat:A new
run_benchmark.shscript that:Testing
The container can be built and tested using:
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 secondsOUTPUT_PATH: Path for output files (default: /results/guidellm_benchmark_results)OUTPUT_FORMAT: Output format (json, yaml, or yml)Security Considerations
Related Issues
Checklist