Skip to main content

Module common

Module common 

Source
Expand description

Shared installer infrastructure modules.

These modules provide common functionality used by all component installers:

  • package management: unified interface for apt/dnf/pacman
  • distro detection: thin facade over platform::detection
  • package mappings: per-distro package name resolution
  • guard: structured error handling, logging, progress, Python validation
  • utils: color-aware output, command existence, print helpers
  • env_validation: .mlstack_env checking with sensible defaults
  • rocm_env: thin facade over platform::linux for ROCm paths/versions
  • ui_helper: CLI arg parsing, path validation, git helpers

§Validation Assertions

  • VAL-INFRA-001: Module structure compiles and integrates
  • VAL-INFRA-019: No code duplication with platform modules

Re-exports§

pub use benchmark_common::format_elapsed;
pub use benchmark_common::is_dry_run;
pub use benchmark_common::normalize_pci_bus_id;
pub use benchmark_common::now_timestamp;
pub use benchmark_common::resolve_log_dir;
pub use benchmark_common::BenchLogger;
pub use benchmark_common::BenchTimer;
pub use benchmark_common::BenchmarkResult;
pub use benchmark_common::BenchmarkResults;
pub use distro::DistroFacade;
pub use env_validation::EnvValidationResult;
pub use env_validation::EnvVars;
pub use guard::detect_python_version;
pub use guard::is_python_supported;
pub use guard::is_python_supported_for_rocm_torch;
pub use guard::log_error;
pub use guard::log_info;
pub use guard::log_warn;
pub use guard::InstallerError;
pub use guard::LogLevel;
pub use guard::ProgressTracker;
pub use guard::PythonVersion;
pub use guard::MAX_ROCM_TORCH_PYTHON;
pub use guard::MIN_PYTHON_VERSION;
pub use package_manager::DryRunResult;
pub use package_manager::PackageManagerFacade;
pub use package_manager::PackageOperation;
pub use package_mappings::map_package_name;
pub use rocm_env::RocmEnv;
pub use sealed_token::SealedToken;
pub use telemetry::submit_build_report;
pub use telemetry::BuildReport;
pub use telemetry::BuildReportStatus;
pub use ui_helper::is_system_path;
pub use ui_helper::UiArgError;
pub use ui_helper::UiArgs;
pub use utils::command_exists;
pub use utils::fix_pip_cache_ownership;
pub use utils::get_colors;
pub use utils::Colors;
pub use utils::PipCacheFixResult;
pub use utils::PythonPkgManager;

Modules§

benchmark_common
Benchmark common utilities — PCI bus ID normalization, timing, result structs with JSON serialization, and timestamped logging.
distro
Thin facade over platform::detection for installer use.
env_validation
Environment validation — .mlstack_env checking with sensible defaults.
guard
Installer guard — structured error handling, logging, progress reporting, and Python version validation.
package_manager
Package manager abstraction for install/remove/query operations.
package_mappings
Per-distro package name mappings.
rocm_env
ROCm environment facade — thin wrapper over platform::linux for ROCm paths/versions.
sealed_token
telemetry
ui_helper
UI installer helper — CLI arg parsing, path validation.
utils
Common utility functions — color-aware output, command existence checks, print helpers.