-
Notifications
You must be signed in to change notification settings - Fork 42
Add Containerized Benchmarking Support for GuideLLM #123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Could you put these files under a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
…arking fix pre-commit issue? Add Docker build files and update .gitignore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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
Dockerfile
that:A new
run_benchmark.sh
script 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