From c0acb0c918c8e6685e6a059111fe997f5730f80b Mon Sep 17 00:00:00 2001 From: wangchen615 Date: Thu, 17 Apr 2025 21:49:48 +0000 Subject: [PATCH 01/12] Add Dockerfile and benchmark script for containerized GuideLLM benchmarking --- Dockerfile | 36 ++++++++++++++++++++++++++++++++++++ run_benchmark.sh | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 Dockerfile create mode 100755 run_benchmark.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..db452a19 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,36 @@ +FROM python:3.11-slim + +LABEL org.opencontainers.image.source="https://github.com/neuralmagic/guidellm" +LABEL org.opencontainers.image.description="GuideLLM Benchmark Container" + +# Install system dependencies +RUN apt-get update && apt-get install -y \ + git \ + curl \ + && rm -rf /var/lib/apt/lists/* + +# Create non-root user +RUN useradd -m -u 1000 guidellm + +# Set working directory +WORKDIR /app + +# Install GuideLLM +RUN pip install git+https://github.com/neuralmagic/guidellm.git + +# Copy and set up the benchmark script +COPY run_benchmark.sh /app/ +RUN chmod +x /app/run_benchmark.sh + +# Set ownership to non-root user +RUN chown -R guidellm:guidellm /app + +# Switch to non-root user +USER guidellm + +# Healthcheck +HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \ + CMD curl -f http://localhost:8000/health || exit 1 + +# Set the entrypoint +ENTRYPOINT ["/app/run_benchmark.sh"] \ No newline at end of file diff --git a/run_benchmark.sh b/run_benchmark.sh new file mode 100755 index 00000000..17606a48 --- /dev/null +++ b/run_benchmark.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# Required environment variables +TARGET=${TARGET:-"http://localhost:8000"} +MODEL=${MODEL:-"neuralmagic/Meta-Llama-3.1-8B-Instruct-quantized.w4a16"} +RATE_TYPE=${RATE_TYPE:-"sweep"} +DATA=${DATA:-"prompt_tokens=256,output_tokens=128"} +MAX_REQUESTS=${MAX_REQUESTS:-"100"} +MAX_SECONDS=${MAX_SECONDS:-""} + +# Output configuration +OUTPUT_PATH=${OUTPUT_PATH:-"/results/guidellm_benchmark_results"} +OUTPUT_FORMAT=${OUTPUT_FORMAT:-"json"} # Can be json, yaml, or yml + +# Build the command +CMD="guidellm benchmark --target \"${TARGET}\" --model \"${MODEL}\" --rate-type \"${RATE_TYPE}\" --data \"${DATA}\"" + +# Add optional parameters +if [ ! -z "${MAX_REQUESTS}" ]; then + CMD="${CMD} --max-requests ${MAX_REQUESTS}" +fi + +if [ ! -z "${MAX_SECONDS}" ]; then + CMD="${CMD} --max-seconds ${MAX_SECONDS}" +fi + +# Add output path with appropriate extension +if [ ! -z "${OUTPUT_PATH}" ]; then + CMD="${CMD} --output-path \"${OUTPUT_PATH}.${OUTPUT_FORMAT}\"" +fi + +# Execute the command +echo "Running command: ${CMD}" +eval "${CMD}" From 0bcc3e719f8bd44acdab16ed7ff2feac3ffac87e Mon Sep 17 00:00:00 2001 From: wangchen615 Date: Thu, 17 Apr 2025 22:06:44 +0000 Subject: [PATCH 02/12] fix pre-commit issue? --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index db452a19..77919ae8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,4 +33,4 @@ HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \ CMD curl -f http://localhost:8000/health || exit 1 # Set the entrypoint -ENTRYPOINT ["/app/run_benchmark.sh"] \ No newline at end of file +ENTRYPOINT ["/app/run_benchmark.sh"] From 5df0868e34bb18d4f2ef398a113efac3c1bbf5f7 Mon Sep 17 00:00:00 2001 From: wangchen615 Date: Thu, 17 Apr 2025 21:49:48 +0000 Subject: [PATCH 03/12] Add Dockerfile and benchmark script for containerized GuideLLM benchmarking fix pre-commit issue? Add Docker build files and update .gitignore --- build/Dockerfile | 32 ++++++++++++++++++++++++++++++++ build/run_benchmark.sh | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 build/Dockerfile create mode 100755 build/run_benchmark.sh diff --git a/build/Dockerfile b/build/Dockerfile new file mode 100644 index 00000000..1654fe81 --- /dev/null +++ b/build/Dockerfile @@ -0,0 +1,32 @@ +FROM python:3.12-slim + +LABEL org.opencontainers.image.source="https://github.com/neuralmagic/guidellm" +LABEL org.opencontainers.image.description="GuideLLM Benchmark Container" + +# Install dependencies and set up environment in a single layer +RUN apt-get update && apt-get install -y \ + git \ + curl \ + && pip install git+https://github.com/neuralmagic/guidellm.git \ + && useradd -m -u 1000 guidellm \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +# Set working directory +WORKDIR /app + +# Copy and set up the benchmark script +COPY build/run_benchmark.sh /app/ + +# Set ownership to non-root user +RUN chown -R guidellm:guidellm /app + +# Switch to non-root user +USER guidellm + +# Healthcheck +HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \ + CMD curl -f http://localhost:8000/health || exit 1 + +# Set the entrypoint +ENTRYPOINT ["/app/run_benchmark.sh"] diff --git a/build/run_benchmark.sh b/build/run_benchmark.sh new file mode 100755 index 00000000..1f4dd0c7 --- /dev/null +++ b/build/run_benchmark.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Required environment variables +TARGET=${TARGET:-"http://localhost:8000"} +MODEL=${MODEL:-"neuralmagic/Meta-Llama-3.1-8B-Instruct-quantized.w4a16"} +RATE_TYPE=${RATE_TYPE:-"sweep"} +DATA=${DATA:-"prompt_tokens=256,output_tokens=128"} +MAX_REQUESTS=${MAX_REQUESTS:-"100"} +MAX_SECONDS=${MAX_SECONDS:-""} + +# Output configuration +OUTPUT_PATH=${OUTPUT_PATH:-"/results/guidellm_benchmark_results"} +OUTPUT_FORMAT=${OUTPUT_FORMAT:-"json"} # Can be json, yaml, or yml + +# Build the command +CMD="guidellm benchmark --target \"${TARGET}\" --model \"${MODEL}\" --rate-type \"${RATE_TYPE}\" --data \"${DATA}\"" + +# Add optional parameters +if [ ! -z "${MAX_REQUESTS}" ]; then + CMD="${CMD} --max-requests ${MAX_REQUESTS}" +fi + +if [ ! -z "${MAX_SECONDS}" ]; then + CMD="${CMD} --max-seconds ${MAX_SECONDS}" +fi + +# Add output path with appropriate extension +if [ ! -z "${OUTPUT_PATH}" ]; then + CMD="${CMD} --output-path \"${OUTPUT_PATH}.${OUTPUT_FORMAT}\"" +fi + +# Execute the command +echo "Running command: ${CMD}" +eval "${CMD}" From f9fd82724163aa84de017417f18e7a56ccd4462d Mon Sep 17 00:00:00 2001 From: wangchen615 Date: Tue, 22 Apr 2025 04:03:46 +0000 Subject: [PATCH 04/12] remote original dockerfile and run_benchmark.sh --- Dockerfile | 36 ------------------------------------ run_benchmark.sh | 34 ---------------------------------- 2 files changed, 70 deletions(-) delete mode 100644 Dockerfile delete mode 100755 run_benchmark.sh diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 77919ae8..00000000 --- a/Dockerfile +++ /dev/null @@ -1,36 +0,0 @@ -FROM python:3.11-slim - -LABEL org.opencontainers.image.source="https://github.com/neuralmagic/guidellm" -LABEL org.opencontainers.image.description="GuideLLM Benchmark Container" - -# Install system dependencies -RUN apt-get update && apt-get install -y \ - git \ - curl \ - && rm -rf /var/lib/apt/lists/* - -# Create non-root user -RUN useradd -m -u 1000 guidellm - -# Set working directory -WORKDIR /app - -# Install GuideLLM -RUN pip install git+https://github.com/neuralmagic/guidellm.git - -# Copy and set up the benchmark script -COPY run_benchmark.sh /app/ -RUN chmod +x /app/run_benchmark.sh - -# Set ownership to non-root user -RUN chown -R guidellm:guidellm /app - -# Switch to non-root user -USER guidellm - -# Healthcheck -HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \ - CMD curl -f http://localhost:8000/health || exit 1 - -# Set the entrypoint -ENTRYPOINT ["/app/run_benchmark.sh"] diff --git a/run_benchmark.sh b/run_benchmark.sh deleted file mode 100755 index 17606a48..00000000 --- a/run_benchmark.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# Required environment variables -TARGET=${TARGET:-"http://localhost:8000"} -MODEL=${MODEL:-"neuralmagic/Meta-Llama-3.1-8B-Instruct-quantized.w4a16"} -RATE_TYPE=${RATE_TYPE:-"sweep"} -DATA=${DATA:-"prompt_tokens=256,output_tokens=128"} -MAX_REQUESTS=${MAX_REQUESTS:-"100"} -MAX_SECONDS=${MAX_SECONDS:-""} - -# Output configuration -OUTPUT_PATH=${OUTPUT_PATH:-"/results/guidellm_benchmark_results"} -OUTPUT_FORMAT=${OUTPUT_FORMAT:-"json"} # Can be json, yaml, or yml - -# Build the command -CMD="guidellm benchmark --target \"${TARGET}\" --model \"${MODEL}\" --rate-type \"${RATE_TYPE}\" --data \"${DATA}\"" - -# Add optional parameters -if [ ! -z "${MAX_REQUESTS}" ]; then - CMD="${CMD} --max-requests ${MAX_REQUESTS}" -fi - -if [ ! -z "${MAX_SECONDS}" ]; then - CMD="${CMD} --max-seconds ${MAX_SECONDS}" -fi - -# Add output path with appropriate extension -if [ ! -z "${OUTPUT_PATH}" ]; then - CMD="${CMD} --output-path \"${OUTPUT_PATH}.${OUTPUT_FORMAT}\"" -fi - -# Execute the command -echo "Running command: ${CMD}" -eval "${CMD}" From 0b72376055a77190246b3b21b6cb9da67dcf3586 Mon Sep 17 00:00:00 2001 From: Samuel Monson Date: Thu, 5 Jun 2025 15:22:00 -0400 Subject: [PATCH 05/12] Dockerfile -> Containerfile --- .gitignore | 4 ---- build/{Dockerfile => Containerfile} | 0 2 files changed, 4 deletions(-) rename build/{Dockerfile => Containerfile} (100%) diff --git a/.gitignore b/.gitignore index 1bafbfdc..5f37bc39 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,6 @@ __pycache__/ # Distribution / packaging .Python -build/ develop-eggs/ dist/ downloads/ @@ -198,9 +197,6 @@ coverage/ /src/ui/.next/ /src/ui/out/ -# production -build/ - # misc *.pem diff --git a/build/Dockerfile b/build/Containerfile similarity index 100% rename from build/Dockerfile rename to build/Containerfile From ac351b3df0ab0ea63694f7688b05be9eb8adfa7f Mon Sep 17 00:00:00 2001 From: Samuel Monson Date: Thu, 5 Jun 2025 16:36:59 -0400 Subject: [PATCH 06/12] Rewrite Containerfile as multi-stage build --- build/Containerfile | 60 ++++++++++++++--------- build/{run_benchmark.sh => entrypoint.sh} | 0 2 files changed, 38 insertions(+), 22 deletions(-) rename build/{run_benchmark.sh => entrypoint.sh} (100%) diff --git a/build/Containerfile b/build/Containerfile index 1654fe81..ee943e10 100644 --- a/build/Containerfile +++ b/build/Containerfile @@ -1,32 +1,48 @@ -FROM python:3.12-slim +ARG PYTHON=3.13 -LABEL org.opencontainers.image.source="https://github.com/neuralmagic/guidellm" -LABEL org.opencontainers.image.description="GuideLLM Benchmark Container" +# Use a multi-stage build to create a lightweight production image +FROM docker.io/python:${PYTHON}-slim as builder -# Install dependencies and set up environment in a single layer -RUN apt-get update && apt-get install -y \ - git \ - curl \ - && pip install git+https://github.com/neuralmagic/guidellm.git \ - && useradd -m -u 1000 guidellm \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* +# Copy repository files +COPY / /src -# Set working directory -WORKDIR /app +# Create a venv and install guidellm +RUN python3 -m venv /opt/guidellm \ + && /opt/guidellm/bin/pip install --no-cache-dir /src + +# Copy entrypoint script into the venv bin directory +RUN install -m0755 /src/build/entrypoint.sh /opt/guidellm/bin/entrypoint.sh + +# Prod image +FROM docker.io/python:${PYTHON}-slim -# Copy and set up the benchmark script -COPY build/run_benchmark.sh /app/ +# Copy the virtual environment from the builder stage +COPY --from=builder /opt/guidellm /opt/guidellm -# Set ownership to non-root user -RUN chown -R guidellm:guidellm /app +# Add guidellm bin to PATH +ENV PATH="/opt/guidellm/bin:$PATH" + +# Create a non-root user +RUN useradd -md /results guidellm # Switch to non-root user USER guidellm -# Healthcheck -HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \ - CMD curl -f http://localhost:8000/health || exit 1 +# Set working directory +WORKDIR /results + +# Metadata +LABEL org.opencontainers.image.source="https://github.com/neuralmagic/guidellm" +LABEL org.opencontainers.image.description="GuideLLM Benchmark Container" -# Set the entrypoint -ENTRYPOINT ["/app/run_benchmark.sh"] +# Set the environment variable for the benchmark script +# TODO: Replace with scenario environment variables +ENV TARGET="http://localhost:8000" \ + MODEL="neuralmagic/Meta-Llama-3.1-8B-Instruct-quantized.w4a16" \ + RATE_TYPE="sweep" \ + DATA="prompt_tokens=256,output_tokens=128" \ + MAX_REQUESTS="100" \ + MAX_SECONDS="" \ + OUTPUT_PATH="/results/results.json" + +ENTRYPOINT [ "/opt/guidellm/bin/entrypoint.sh" ] diff --git a/build/run_benchmark.sh b/build/entrypoint.sh similarity index 100% rename from build/run_benchmark.sh rename to build/entrypoint.sh From e3b6ba4abe1116f05a120f8a855c2c0a19e606ea Mon Sep 17 00:00:00 2001 From: Samuel Monson Date: Thu, 5 Jun 2025 16:38:54 -0400 Subject: [PATCH 07/12] Drop env handling if entrypoint has args --- build/entrypoint.sh | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/build/entrypoint.sh b/build/entrypoint.sh index 1f4dd0c7..ed8d3c64 100755 --- a/build/entrypoint.sh +++ b/build/entrypoint.sh @@ -1,17 +1,11 @@ #!/usr/bin/env bash set -euo pipefail -# Required environment variables -TARGET=${TARGET:-"http://localhost:8000"} -MODEL=${MODEL:-"neuralmagic/Meta-Llama-3.1-8B-Instruct-quantized.w4a16"} -RATE_TYPE=${RATE_TYPE:-"sweep"} -DATA=${DATA:-"prompt_tokens=256,output_tokens=128"} -MAX_REQUESTS=${MAX_REQUESTS:-"100"} -MAX_SECONDS=${MAX_SECONDS:-""} - -# Output configuration -OUTPUT_PATH=${OUTPUT_PATH:-"/results/guidellm_benchmark_results"} -OUTPUT_FORMAT=${OUTPUT_FORMAT:-"json"} # Can be json, yaml, or yml +# If we receive any arguments switch to guidellm command +if [ $# -gt 0 ]; then + echo "Running command: guidellm $*" + exec guidellm "$@" +fi # Build the command CMD="guidellm benchmark --target \"${TARGET}\" --model \"${MODEL}\" --rate-type \"${RATE_TYPE}\" --data \"${DATA}\"" @@ -27,7 +21,7 @@ fi # Add output path with appropriate extension if [ ! -z "${OUTPUT_PATH}" ]; then - CMD="${CMD} --output-path \"${OUTPUT_PATH}.${OUTPUT_FORMAT}\"" + CMD="${CMD} --output-path \"${OUTPUT_PATH}\"" fi # Execute the command From b7e2e5d6439eb1377eee1002ff7bf724eb3aa793 Mon Sep 17 00:00:00 2001 From: Samuel Monson Date: Fri, 6 Jun 2025 10:08:56 -0400 Subject: [PATCH 08/12] Switch CMD str to vector --- build/entrypoint.sh | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/build/entrypoint.sh b/build/entrypoint.sh index ed8d3c64..f1c398a1 100755 --- a/build/entrypoint.sh +++ b/build/entrypoint.sh @@ -1,29 +1,30 @@ #!/usr/bin/env bash set -euo pipefail +# Path to the guidellm binary +guidellm_bin="/opt/guidellm/bin/guidellm" + # If we receive any arguments switch to guidellm command if [ $# -gt 0 ]; then echo "Running command: guidellm $*" - exec guidellm "$@" + exec $guidellm_bin "$@" fi -# Build the command -CMD="guidellm benchmark --target \"${TARGET}\" --model \"${MODEL}\" --rate-type \"${RATE_TYPE}\" --data \"${DATA}\"" +# NOTE: Bash vec + exec prevent shell escape issues +CMD=("${guidellm_bin}" "benchmark" "--target" "${TARGET}" "--model" "${MODEL}" "--rate-type" "${RATE_TYPE}" "--data" "${DATA}") -# Add optional parameters -if [ ! -z "${MAX_REQUESTS}" ]; then - CMD="${CMD} --max-requests ${MAX_REQUESTS}" +if [ -n "${MAX_REQUESTS}" ]; then + CMD+=("--max-requests" "${MAX_REQUESTS}") fi -if [ ! -z "${MAX_SECONDS}" ]; then - CMD="${CMD} --max-seconds ${MAX_SECONDS}" +if [ -n "${MAX_SECONDS}" ]; then + CMD+=("--max-seconds" "${MAX_SECONDS}") fi -# Add output path with appropriate extension -if [ ! -z "${OUTPUT_PATH}" ]; then - CMD="${CMD} --output-path \"${OUTPUT_PATH}\"" +if [ -n "${OUTPUT_PATH}" ]; then + CMD+=("--output-path" "${OUTPUT_PATH}") fi # Execute the command -echo "Running command: ${CMD}" -eval "${CMD}" +echo "Running command: ${CMD[*]}" +exec "${CMD[@]}" From 23380bd5d51486c905c9527b16a23d693bd74d64 Mon Sep 17 00:00:00 2001 From: Samuel Monson Date: Fri, 6 Jun 2025 10:41:07 -0400 Subject: [PATCH 09/12] Build CMD dynamically from available ENV --- build/Containerfile | 14 +++++++------- build/entrypoint.sh | 28 +++++++++++++++++----------- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/build/Containerfile b/build/Containerfile index ee943e10..72ff7991 100644 --- a/build/Containerfile +++ b/build/Containerfile @@ -37,12 +37,12 @@ LABEL org.opencontainers.image.description="GuideLLM Benchmark Container" # Set the environment variable for the benchmark script # TODO: Replace with scenario environment variables -ENV TARGET="http://localhost:8000" \ - MODEL="neuralmagic/Meta-Llama-3.1-8B-Instruct-quantized.w4a16" \ - RATE_TYPE="sweep" \ - DATA="prompt_tokens=256,output_tokens=128" \ - MAX_REQUESTS="100" \ - MAX_SECONDS="" \ - OUTPUT_PATH="/results/results.json" +ENV GUIDELLM_TARGET="http://localhost:8000" \ + GUIDELLM_MODEL="neuralmagic/Meta-Llama-3.1-8B-Instruct-quantized.w4a16" \ + GUIDELLM_RATE_TYPE="sweep" \ + GUIDELLM_DATA="prompt_tokens=256,output_tokens=128" \ + GUIDELLM_MAX_REQUESTS="100" \ + GUIDELLM_MAX_SECONDS="" \ + GUIDELLM_OUTPUT_PATH="/results/results.json" ENTRYPOINT [ "/opt/guidellm/bin/entrypoint.sh" ] diff --git a/build/entrypoint.sh b/build/entrypoint.sh index f1c398a1..40d9fc3f 100755 --- a/build/entrypoint.sh +++ b/build/entrypoint.sh @@ -10,20 +10,26 @@ if [ $# -gt 0 ]; then exec $guidellm_bin "$@" fi -# NOTE: Bash vec + exec prevent shell escape issues -CMD=("${guidellm_bin}" "benchmark" "--target" "${TARGET}" "--model" "${MODEL}" "--rate-type" "${RATE_TYPE}" "--data" "${DATA}") +# Get a list of environment variables that start with GUIDELLM_ +args="$(printenv | cut -d= -f1 | grep -E '^GUIDELLM_')" -if [ -n "${MAX_REQUESTS}" ]; then - CMD+=("--max-requests" "${MAX_REQUESTS}") -fi +# NOTE: Bash array + exec prevent shell escape issues +CMD=("${guidellm_bin}" "benchmark") -if [ -n "${MAX_SECONDS}" ]; then - CMD+=("--max-seconds" "${MAX_SECONDS}") -fi +# Parse environment variables for the benchmark command +for var in $args; do + # Remove GUIDELLM_ prefix + arg_name="${var#GUIDELLM_}" + # Convert to lowercase + arg_name="${arg_name,,}" + # Replace underscores with dashes + arg_name="${arg_name//_/-}" -if [ -n "${OUTPUT_PATH}" ]; then - CMD+=("--output-path" "${OUTPUT_PATH}") -fi + # Add the argument to the command array if set + if [ -n "${!var}" ]; then + CMD+=("--${arg_name}" "${!var}") + fi +done # Execute the command echo "Running command: ${CMD[*]}" From ee19ea46272e61d2a0d8b41da864541b1768d06c Mon Sep 17 00:00:00 2001 From: Samuel Monson Date: Fri, 6 Jun 2025 11:16:51 -0400 Subject: [PATCH 10/12] Ignore config ENV in entrypoint --- build/entrypoint.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build/entrypoint.sh b/build/entrypoint.sh index 40d9fc3f..d6ff4ea0 100755 --- a/build/entrypoint.sh +++ b/build/entrypoint.sh @@ -20,6 +20,13 @@ CMD=("${guidellm_bin}" "benchmark") for var in $args; do # Remove GUIDELLM_ prefix arg_name="${var#GUIDELLM_}" + + # If there is an extra underscore at the + # start than this is a config variable + if [ "${arg_name:0:1}" == "_" ]; then + continue + fi + # Convert to lowercase arg_name="${arg_name,,}" # Replace underscores with dashes From 3d79186a8f60fe794092f3a9d57ef663fdd71b87 Mon Sep 17 00:00:00 2001 From: Samuel Monson Date: Mon, 9 Jun 2025 16:05:45 -0400 Subject: [PATCH 11/12] Avoid collision with build artifacts --- .gitignore | 4 ++++ {build => deploy}/Containerfile | 2 +- {build => deploy}/entrypoint.sh | 0 3 files changed, 5 insertions(+), 1 deletion(-) rename {build => deploy}/Containerfile (94%) rename {build => deploy}/entrypoint.sh (100%) diff --git a/.gitignore b/.gitignore index 5f37bc39..1bafbfdc 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ __pycache__/ # Distribution / packaging .Python +build/ develop-eggs/ dist/ downloads/ @@ -197,6 +198,9 @@ coverage/ /src/ui/.next/ /src/ui/out/ +# production +build/ + # misc *.pem diff --git a/build/Containerfile b/deploy/Containerfile similarity index 94% rename from build/Containerfile rename to deploy/Containerfile index 72ff7991..2ed211e8 100644 --- a/build/Containerfile +++ b/deploy/Containerfile @@ -11,7 +11,7 @@ RUN python3 -m venv /opt/guidellm \ && /opt/guidellm/bin/pip install --no-cache-dir /src # Copy entrypoint script into the venv bin directory -RUN install -m0755 /src/build/entrypoint.sh /opt/guidellm/bin/entrypoint.sh +RUN install -m0755 /src/deploy/entrypoint.sh /opt/guidellm/bin/entrypoint.sh # Prod image FROM docker.io/python:${PYTHON}-slim diff --git a/build/entrypoint.sh b/deploy/entrypoint.sh similarity index 100% rename from build/entrypoint.sh rename to deploy/entrypoint.sh From 938a71c0286801da9ae9351d188341fb59eca8a2 Mon Sep 17 00:00:00 2001 From: Samuel Monson Date: Mon, 16 Jun 2025 14:48:38 -0400 Subject: [PATCH 12/12] Merge LABEL build stages --- deploy/Containerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/Containerfile b/deploy/Containerfile index 2ed211e8..6c7d5613 100644 --- a/deploy/Containerfile +++ b/deploy/Containerfile @@ -32,8 +32,8 @@ USER guidellm WORKDIR /results # Metadata -LABEL org.opencontainers.image.source="https://github.com/neuralmagic/guidellm" -LABEL org.opencontainers.image.description="GuideLLM Benchmark Container" +LABEL org.opencontainers.image.source="https://github.com/neuralmagic/guidellm" \ + org.opencontainers.image.description="GuideLLM Performance Benchmarking Container" # Set the environment variable for the benchmark script # TODO: Replace with scenario environment variables