Skip to content

Commit 7d38111

Browse files
fix(sglang): keep single column-0 exec in entrypoint for sanity dry-run
Wrapping the terminal exec in an if/else indented both exec lines, so the sanity test's entrypoint dry-run regex (^exec python3 ...) no longer matched and TestEntrypointArgHandling execed the real launch_server, timing out (7 errors). Select the launch target into a variable and keep one unindented exec python3 line, matching the vllm entrypoint convention.
1 parent 72437ef commit 7d38111

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

scripts/docker/sglang/sagemaker_entrypoint.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ if ! [[ " ${ARGS[@]} " =~ " --model-path " ]]; then
5656
ARGS+=(--model-path "${SM_SGLANG_MODEL_PATH:-/opt/ml/model}")
5757
fi
5858

59+
# diffusion routes through the wrapper that adds SageMaker's /ping + /invocations routes.
5960
if [ "$ENGINE" = "diffusion" ]; then
60-
# multimodal_gen's server lacks the SageMaker /ping + /invocations routes,
61-
# so launch it through the wrapper that adds them.
62-
echo "Running command: exec python3 /usr/local/bin/sagemaker_diffusion_serve.py ${ARGS[@]}"
63-
exec python3 /usr/local/bin/sagemaker_diffusion_serve.py "${ARGS[@]}"
61+
LAUNCH_TARGET=(/usr/local/bin/sagemaker_diffusion_serve.py)
6462
else
65-
echo "Running command: exec python3 -m sglang.launch_server ${ARGS[@]}"
66-
exec python3 -m sglang.launch_server "${ARGS[@]}"
63+
LAUNCH_TARGET=(-m sglang.launch_server)
6764
fi
65+
66+
echo "Running command: exec python3 ${LAUNCH_TARGET[@]} ${ARGS[@]}"
67+
exec python3 "${LAUNCH_TARGET[@]}" "${ARGS[@]}"

0 commit comments

Comments
 (0)