|
86 | 86 | └─ ✅ dynamo.vllm $HOME/dynamo/components/src/dynamo/vllm/__init__.py |
87 | 87 |
|
88 | 88 | Usage: |
89 | | - python deploy/sanity_check.py [--thorough-check] [--terse] |
| 89 | + python deploy/sanity_check.py [--thorough-check] [--terse] [--runtime-check] |
90 | 90 |
|
91 | 91 | Options: |
92 | 92 | --thorough-check Enable thorough checking (file permissions, directory sizes, HuggingFace model details) |
93 | 93 | --terse Enable terse output mode (show only essential info and errors) |
| 94 | + --runtime-check Skip compile-time dependency checks (Rust, Cargo, Maturin) for runtime containers |
94 | 95 | """ |
95 | 96 |
|
96 | 97 | import datetime |
@@ -297,9 +298,11 @@ def __init__( |
297 | 298 | hostname: Optional[str] = None, |
298 | 299 | thorough_check: bool = False, |
299 | 300 | terse: bool = False, |
| 301 | + runtime_check: bool = False, |
300 | 302 | ): |
301 | 303 | self.thorough_check = thorough_check |
302 | 304 | self.terse = terse |
| 305 | + self.runtime_check = runtime_check |
303 | 306 | if hostname is None: |
304 | 307 | hostname = platform.node() |
305 | 308 |
|
@@ -332,16 +335,22 @@ def __init__( |
332 | 335 | # In terse mode, only add other components if they have errors |
333 | 336 | if not self.terse: |
334 | 337 | # Add file permissions check |
335 | | - self.add_child(FilePermissionsInfo(thorough_check=self.thorough_check)) |
| 338 | + self.add_child( |
| 339 | + FilePermissionsInfo( |
| 340 | + thorough_check=self.thorough_check, runtime_check=self.runtime_check |
| 341 | + ) |
| 342 | + ) |
336 | 343 |
|
337 | 344 | # Add HuggingFace cache check |
338 | 345 | self.add_child(HuggingFaceInfo(thorough_check=self.thorough_check)) |
339 | 346 |
|
340 | | - # Add Cargo (always show, even if not found) |
341 | | - self.add_child(CargoInfo(thorough_check=self.thorough_check)) |
| 347 | + # Skip compile-time dependencies in runtime-check mode |
| 348 | + if not self.runtime_check: |
| 349 | + # Add Cargo (always show, even if not found) |
| 350 | + self.add_child(CargoInfo(thorough_check=self.thorough_check)) |
342 | 351 |
|
343 | | - # Add Maturin (Python-Rust build tool) |
344 | | - self.add_child(MaturinInfo()) |
| 352 | + # Add Maturin (Python-Rust build tool) |
| 353 | + self.add_child(MaturinInfo()) |
345 | 354 |
|
346 | 355 | # Add Python info |
347 | 356 | self.add_child(PythonInfo()) |
@@ -389,12 +398,24 @@ def _add_error_only_components(self) -> None: |
389 | 398 | """In terse mode, only add components that have errors""" |
390 | 399 | # Create components and check their status |
391 | 400 | components_to_check = [ |
392 | | - ("File System", FilePermissionsInfo(thorough_check=self.thorough_check)), |
393 | | - ("Cargo", CargoInfo(thorough_check=self.thorough_check)), |
394 | | - ("Maturin", MaturinInfo()), |
| 401 | + ( |
| 402 | + "File System", |
| 403 | + FilePermissionsInfo( |
| 404 | + thorough_check=self.thorough_check, runtime_check=self.runtime_check |
| 405 | + ), |
| 406 | + ), |
395 | 407 | ("Python", PythonInfo()), |
396 | 408 | ] |
397 | 409 |
|
| 410 | + # Skip compile-time dependencies in runtime-check mode |
| 411 | + if not self.runtime_check: |
| 412 | + components_to_check.extend( |
| 413 | + [ |
| 414 | + ("Cargo", CargoInfo(thorough_check=self.thorough_check)), |
| 415 | + ("Maturin", MaturinInfo()), |
| 416 | + ] |
| 417 | + ) |
| 418 | + |
398 | 419 | for name, component in components_to_check: |
399 | 420 | # Only add if the component has an error status |
400 | 421 | if component.status == NodeStatus.ERROR: |
@@ -721,28 +742,33 @@ class FilePermissionsInfo(NodeInfo): |
721 | 742 |
|
722 | 743 | Checks writability of critical directories needed for: |
723 | 744 | - Dynamo development (top-level dynamo directory) |
724 | | - - Rust development (Cargo target directory + all files, RUSTUP_HOME, CARGO_HOME) |
| 745 | + - Rust development (Cargo target directory + all files, RUSTUP_HOME, CARGO_HOME) - skipped in runtime_check mode |
725 | 746 | - Python development (site-packages) |
726 | 747 |
|
727 | 748 | In thorough mode, also checks disk space for the dynamo working directory |
728 | 749 | and shows a warning if less than 10% free space is available. |
729 | 750 |
|
730 | 751 | In fast mode, skips recursive file checking in Cargo target directory |
731 | 752 | for improved performance on large target directories. |
| 753 | +
|
| 754 | + In runtime_check mode, skips Rust/Cargo toolchain checks. |
732 | 755 | """ |
733 | 756 |
|
734 | | - def __init__(self, thorough_check: bool = False): |
| 757 | + def __init__(self, thorough_check: bool = False, runtime_check: bool = False): |
735 | 758 | super().__init__(label="File System", status=NodeStatus.INFO) |
736 | 759 | self.thorough_check = thorough_check |
| 760 | + self.runtime_check = runtime_check |
737 | 761 |
|
738 | 762 | # Check top-level dynamo directory |
739 | 763 | self._check_dynamo_directory_permissions() |
740 | 764 |
|
741 | | - # Check Rust toolchain directories (RUSTUP_HOME and CARGO_HOME) |
742 | | - self._check_rust_toolchain_permissions() |
| 765 | + # Skip Rust toolchain checks in runtime-check mode |
| 766 | + if not self.runtime_check: |
| 767 | + # Check Rust toolchain directories (RUSTUP_HOME and CARGO_HOME) |
| 768 | + self._check_rust_toolchain_permissions() |
743 | 769 |
|
744 | | - # Check Cargo target directory (with optional recursive file checking) |
745 | | - self._check_cargo_target_permissions() |
| 770 | + # Check Cargo target directory (with optional recursive file checking) |
| 771 | + self._check_cargo_target_permissions() |
746 | 772 |
|
747 | 773 | # Check Python site-packages directory |
748 | 774 | self._check_site_packages_permissions() |
@@ -2485,14 +2511,23 @@ def main(): |
2485 | 2511 | action="store_true", |
2486 | 2512 | help="Show only essential information (OS, User, GPU, Framework, Dynamo) and errors", |
2487 | 2513 | ) |
| 2514 | + parser.add_argument( |
| 2515 | + "--runtime-check", |
| 2516 | + action="store_true", |
| 2517 | + help="Skip compile-time dependency checks (Rust, Cargo, Maturin) for runtime containers", |
| 2518 | + ) |
2488 | 2519 | args = parser.parse_args() |
2489 | 2520 |
|
2490 | 2521 | # Validate mutual exclusion |
2491 | 2522 | if args.thorough_check and args.terse: |
2492 | 2523 | parser.error("--thorough-check and --terse cannot be used together") |
2493 | 2524 |
|
2494 | 2525 | # Simply create a SystemInfo instance - it collects everything in its constructor |
2495 | | - tree = SystemInfo(thorough_check=args.thorough_check, terse=args.terse) |
| 2526 | + tree = SystemInfo( |
| 2527 | + thorough_check=args.thorough_check, |
| 2528 | + terse=args.terse, |
| 2529 | + runtime_check=args.runtime_check, |
| 2530 | + ) |
2496 | 2531 | tree.print_tree() |
2497 | 2532 |
|
2498 | 2533 | # Check if there are framework component errors and show installation recommendation |
|
0 commit comments