diff --git a/Dockerfile b/Dockerfile index 53279c5..6f4e0e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ FROM registry.fedoraproject.org/fedora:43 RUN dnf -y install --setopt=install_weak_deps=False --nodocs \ python3.13 python3.13-devel git rsync libatomic bash ca-certificates curl \ gcc gcc-c++ binutils make ffmpeg-free \ - cmake ninja-build aria2c tar xz vim nano \ + cmake ninja-build aria2c tar xz vim nano dialog \ libdrm-devel zlib-devel openssl-devel pgrep \ numactl-devel gperftools-libs \ && dnf clean all && rm -rf /var/cache/dnf/* diff --git a/scripts/start_vllm.py b/scripts/start_vllm.py index 7e3deb4..5a2e3f3 100644 --- a/scripts/start_vllm.py +++ b/scripts/start_vllm.py @@ -31,6 +31,42 @@ else: HOST = os.getenv("HOST", "0.0.0.0") PORT = os.getenv("PORT", "8000") +def get_discovered_models(): + """ + Overrides the hardcoded MODELS_TO_RUN by looking at what we actually have results for. + This allows the UI to show all verified models, not just what's enabled for benchmarking. + """ + if not RESULTS_FILE.exists(): + return MODELS_TO_RUN + + try: + with open(RESULTS_FILE, "r") as f: + data = json.load(f) + + # 1. Find all models with at least one success + verified_models = set() + for r in data: + if r.get("status") == "success": + verified_models.add(r["model"]) + + # 2. Filter: Must be in MODEL_TABLE (so we have config/valid_tp) + # and must be in our verified list + final_list = [] + for m in sorted(list(verified_models)): + if m in MODEL_TABLE: + final_list.append(m) + + if final_list: + return final_list + + except Exception as e: + print(f"Warning: Model discovery failed ({e}). Using default list.") + + return MODELS_TO_RUN + +# Refresh the list of models to run based on what we found +MODELS_TO_RUN = get_discovered_models() + def check_dependencies(): if not shutil.which("dialog"): print("Error: 'dialog' is required. Please install it (apt-get install dialog).")