diff --git a/docker/Dockerfile b/docker/Dockerfile index 0d50d97e54c6..91612c315fb3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -593,5 +593,8 @@ ENTRYPOINT ["./sagemaker-entrypoint.sh"] FROM vllm-openai-base AS vllm-openai -ENTRYPOINT ["vllm", "serve"] +COPY docker/entrypoint.sh . +RUN chmod +x entrypoint.sh + +ENTRYPOINT ["./entrypoint.sh"] #################### OPENAI API SERVER #################### diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh new file mode 100644 index 000000000000..4bf86e70e063 --- /dev/null +++ b/docker/entrypoint.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -e + +# Standard-supervisor from github.com/aws/model-hosting-container-standards provides features like: +# - Process supervision and automatic restart +# - ENV variable to CLI argument conversion (VLLM_ARG_* -> --arg) +# - Graceful shutdown handling +# +# Control standard-supervisor usage with VLLM_USE_STANDARD_SUPERVISOR: +# - "false" (default): Direct execution without standard-supervisor +# - "true": Enable all standard-supervisor features +# - Future: Could support selective feature flags like "env-conversion-only" + +VLLM_USE_STANDARD_SUPERVISOR="${VLLM_USE_STANDARD_SUPERVISOR:-false}" + +if [ "$VLLM_USE_STANDARD_SUPERVISOR" = "true" ]; then + # Use standard-supervisor launcher with all features + exec standard-supervisor vllm serve "$@" +else + # Direct execution without standard-supervisor + exec vllm serve "$@" +fi diff --git a/requirements/common.txt b/requirements/common.txt index f18560b98d16..d81c48494fa0 100644 --- a/requirements/common.txt +++ b/requirements/common.txt @@ -50,4 +50,4 @@ ijson # Required for mistral streaming tool parser setproctitle # Used to set process names for better debugging and monitoring openai-harmony >= 0.0.3 # Required for gpt-oss anthropic == 0.71.0 -model-hosting-container-standards >= 0.1.9, < 1.0.0 \ No newline at end of file +model-hosting-container-standards >= 0.1.9, < 1.0.0 # Required for SageMaker integration