Skip to content

Commit ba1b8d6

Browse files
committed
Drop env handling if entrypoint has args
1 parent 07a3db3 commit ba1b8d6

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

build/entrypoint.sh

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4-
# Required environment variables
5-
TARGET=${TARGET:-"http://localhost:8000"}
6-
MODEL=${MODEL:-"neuralmagic/Meta-Llama-3.1-8B-Instruct-quantized.w4a16"}
7-
RATE_TYPE=${RATE_TYPE:-"sweep"}
8-
DATA=${DATA:-"prompt_tokens=256,output_tokens=128"}
9-
MAX_REQUESTS=${MAX_REQUESTS:-"100"}
10-
MAX_SECONDS=${MAX_SECONDS:-""}
11-
12-
# Output configuration
13-
OUTPUT_PATH=${OUTPUT_PATH:-"/results/guidellm_benchmark_results"}
14-
OUTPUT_FORMAT=${OUTPUT_FORMAT:-"json"} # Can be json, yaml, or yml
4+
# If we receive any arguments switch to guidellm command
5+
if [ $# -gt 0 ]; then
6+
echo "Running command: guidellm $*"
7+
exec guidellm "$@"
8+
fi
159

1610
# Build the command
1711
CMD="guidellm benchmark --target \"${TARGET}\" --model \"${MODEL}\" --rate-type \"${RATE_TYPE}\" --data \"${DATA}\""
@@ -27,7 +21,7 @@ fi
2721

2822
# Add output path with appropriate extension
2923
if [ ! -z "${OUTPUT_PATH}" ]; then
30-
CMD="${CMD} --output-path \"${OUTPUT_PATH}.${OUTPUT_FORMAT}\""
24+
CMD="${CMD} --output-path \"${OUTPUT_PATH}\""
3125
fi
3226

3327
# Execute the command

0 commit comments

Comments
 (0)