Unverified Commit e30696e5 authored by Yan Ru Pei's avatar Yan Ru Pei Committed by GitHub
Browse files

chore: allow frontend + mockers to run on macos (#6282)


Signed-off-by: default avatarPeaBrane <yanrpei@gmail.com>
parent a289695c
......@@ -26,7 +26,6 @@ default = []
media-ffmpeg = ["dynamo-llm/media-ffmpeg"]
[dependencies]
dynamo-llm = { path = "../../llm" }
dynamo-runtime = { path = "../../runtime" }
dynamo-parsers = { path = "../../parsers" }
......@@ -74,5 +73,11 @@ cudarc = { version = "0.17.1", features = ["cuda-12020"], optional = true }
prometheus = "0.14.0"
[target.'cfg(target_os = "linux")'.dependencies]
dynamo-llm = { path = "../../llm" }
[target.'cfg(not(target_os = "linux"))'.dependencies]
dynamo-llm = { path = "../../llm", default-features = false }
[dev-dependencies]
rstest = "0.25"
// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
//! Build script for dynamo-py3.
//!
//! On macOS, nixl-sys unconditionally links `-lstdc++` which doesn't exist
//! (macOS uses libc++). We create an empty static archive to satisfy the
//! linker since libc++ is already linked.
fn main() {
#[cfg(target_os = "macos")]
{
let out_dir = std::env::var("OUT_DIR").unwrap();
let lib_path = format!("{}/libstdc++.a", out_dir);
// Write a minimal valid static archive (just the magic header).
// macOS `ar` refuses to create an empty archive, so write it directly.
std::fs::write(&lib_path, b"!<arch>\n").expect("failed to create empty libstdc++.a");
println!("cargo:rustc-link-search=native={}", out_dir);
}
}
......@@ -17,7 +17,7 @@ use crate::entrypoint::RouterConfig;
use crate::mocker::protocols::{MockEngineArgs, WorkerType};
use crate::model_card::ModelDeploymentCard;
use crate::model_type::{ModelInput, ModelType};
use crate::preprocessor::media::{ImageDecoder, MediaDecoder, MediaFetcher};
use crate::preprocessor::media::{MediaDecoder, MediaFetcher};
use crate::request_template::RequestTemplate;
pub mod runtime_config;
......@@ -245,12 +245,6 @@ impl LocalModelBuilder {
self.runtime_config.enable_local_indexer = mocker_engine_args.enable_local_indexer
&& mocker_engine_args.worker_type != WorkerType::Decode;
self.runtime_config.data_parallel_size = mocker_engine_args.dp_size;
self.media_decoder = Some(MediaDecoder {
image: Some(ImageDecoder::default()),
#[cfg(feature = "media-ffmpeg")]
video: None,
});
self.media_fetcher = Some(MediaFetcher::default());
// Set bootstrap endpoint for prefill workers with bootstrap_port configured
if mocker_engine_args.worker_type == WorkerType::Prefill
......
......@@ -204,7 +204,7 @@ impl PerfModel {
};
// Ensure non-negative timing
let result = time.max(0.0);
tracing::debug!("Prefill time prediction: new_tokens={new_tokens}, time={result:.2}ms");
tracing::trace!("Prefill time prediction: new_tokens={new_tokens}, time={result:.2}ms");
result
}
......@@ -229,7 +229,7 @@ impl PerfModel {
};
// Ensure non-negative timing
let result = time.max(0.0);
tracing::debug!(
tracing::trace!(
"Decode time prediction: active_kv_tokens={active_kv_tokens}, context_length={context_length}, time={result:.2}ms"
);
result
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment