commit d71248d0f62321de1b2a72bcb05f898d2085e3ed Author: biondizzle Date: Sat Apr 11 23:39:36 2026 +0000 init commit diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b3bce55 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM lmsysorg/sglang-rocm:v0.5.10rc0-rocm700-mi30x-20260411 + +COPY entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh + +ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..9546e4c --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,42 @@ +#!/bin/bash +set -euo pipefail + +# Defaults matching vLLM production stack defaults +HOST="0.0.0.0" +PORT="8000" + +# Save original args before parsing eats them +ALL_ARGS="$*" + +# Parse only host and port from whatever args the vLLM stack sends. +# Everything else is ignored. +while [[ $# -gt 0 ]]; do + case "$1" in + --host) HOST="$2"; shift 2 ;; + --host=*) HOST="${1#*=}"; shift ;; + --port) PORT="$2"; shift 2 ;; + --port=*) PORT="${1#*=}"; shift ;; + *) shift ;; # ignore everything else + esac +done + +echo "=== vLLM production stack args received ===" +echo "Raw args: $ALL_ARGS" +echo "" +i=1 +for arg in $ALL_ARGS; do + echo " [$i] $arg" + i=$((i + 1)) +done +echo "============================================" +echo "" +echo "=== SGLang shim ===" +echo "Ignoring vLLM args. Launching SGLang on ${HOST}:${PORT}" +echo "===================" + +exec python -m sglang.launch_server \ + --model-path mistralai/Devstral-2-123B-Instruct-2512 \ + --host "$HOST" \ + --port "$PORT" \ + --tp 8 \ + --tool-call-parser mistral \ No newline at end of file