pub struct VllmInstaller { /* private fields */ }Expand description
The vLLM installer.
Implementations§
Source§impl VllmInstaller
impl VllmInstaller
Sourcepub fn new(config: VllmConfig) -> Self
pub fn new(config: VllmConfig) -> Self
Create a new vLLM installer with the given config.
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create with default config.
Sourcepub fn dependencies(&self) -> &[&str]
pub fn dependencies(&self) -> &[&str]
vLLM depends on PyTorch.
Sourcepub fn validate_dependencies(&self, installed_components: &[&str]) -> Result<()>
pub fn validate_dependencies(&self, installed_components: &[&str]) -> Result<()>
Validate that all dependencies are satisfied.
Sourcepub fn detect_rocm_mm(&self) -> String
pub fn detect_rocm_mm(&self) -> String
Detect ROCm major.minor version.
Sourcepub fn rocm_index_url(&self) -> String
pub fn rocm_index_url(&self) -> String
Get the ROCm PyTorch wheel index URL.
Sourcepub fn vllm_wheels_url(&self) -> &'static str
pub fn vllm_wheels_url(&self) -> &'static str
Get the vLLM ROCm wheels extra index URL.
Sourcepub fn build_vllm_install_command(&self) -> ShellCommand
pub fn build_vllm_install_command(&self) -> ShellCommand
Construct the pip install command for vLLM from ROCm wheels.
The original script uses:
pip install --no-cache-dir --no-deps vllm --extra-index-url https://wheels.vllm.ai/rocm/
Sourcepub fn build_deps_install_command(&self) -> ShellCommand
pub fn build_deps_install_command(&self) -> ShellCommand
Construct the pip install command for vLLM dependencies.
Installs the core dependencies needed by vLLM (excluding torch and xformers).
Sourcepub fn build_versioned_deps_command(&self) -> ShellCommand
pub fn build_versioned_deps_command(&self) -> ShellCommand
Construct the pip install command for vLLM versioned dependencies.
These have specific version pins from the original script.
Sourcepub fn build_integrity_check_command(&self) -> ShellCommand
pub fn build_integrity_check_command(&self) -> ShellCommand
Validate that the vLLM dependency closure is internally consistent.
This is intentionally read-only. It catches stale or missing packages
after Rusty’s --no-deps installs without allowing pip to mutate torch,
ROCm, CUDA/NVIDIA libraries, or any other stack component.
Sourcepub fn triton_cache_env(&self) -> Vec<(String, String)>
pub fn triton_cache_env(&self) -> Vec<(String, String)>
Construct the Triton cache environment setup command.
Sets up writable cache directories for Triton kernel compilation.
Sourcepub fn build_tools_install_command(&self) -> ShellCommand
pub fn build_tools_install_command(&self) -> ShellCommand
Install the build tools vLLM’s source build needs (cmake/ninja/wheel/ setuptools/patchelf). The env already supplies ROCm dev headers + torch; these are the remaining pip-installable build tools. (rust/cargo, if an optional dep ever needs it, is a system package — not pip-installable.)
Sourcepub fn build_source_install_command(&self, version: &str) -> ShellCommand
pub fn build_source_install_command(&self, version: &str) -> ShellCommand
Build vLLM FROM SOURCE against the env’s installed torch.
The prebuilt ROCm wheel is compiled against a specific torch (e.g.
2.11.0) and ABI-breaks against the env’s torch (e.g. 2.12.1+rocm7.2) —
vllm._C.abi3.so: undefined symbol: _ZNR5torch7Library4_defE…. Building
the sdist with --no-build-isolation compiles the C/HIP extensions
against the ACTUAL installed torch, so the symbols match. --no-deps
guarantees pip NEVER swaps the env’s torch (vLLM pins torch==
Sourcepub fn resolve_version_with_policy(
&self,
version_lag: u32,
min_age_days: u32,
) -> String
pub fn resolve_version_with_policy( &self, version_lag: u32, min_age_days: u32, ) -> String
Resolve the vLLM version to build, applying the user’s supply-chain gate.
Queries PyPI’s release list (versions + upload dates), drops pre-releases,
then picks the newest release satisfying BOTH: (a) not within the
version_lag newest (lag=1 = skip the latest), AND (b) at least
min_age_days old (0 = no age requirement). Falls back to
VLLM_SOURCE_VERSION if PyPI is unreachable or no release qualifies.
Sourcepub fn build_force_reinstall_command(&self) -> ShellCommand
pub fn build_force_reinstall_command(&self) -> ShellCommand
Construct the force-reinstall command for vLLM wheel repair.
Sourcepub fn build_source_rebuild_command(&self, version: &str) -> ShellCommand
pub fn build_source_rebuild_command(&self, version: &str) -> ShellCommand
Construct the source rebuild command for vLLM.
Used as a fallback when wheel install fails. Accepts the
policy-resolved version (the same value build_source_install_command
pins) so the fallback honors the resolve_version_with_policy
version-lag / min-age supply-chain gate instead of silently installing
the newest bare vllm from source. VLLM_VERSION_OVERRIDE is set for
the same reason as the primary source-install path: it suppresses the
+rocmNNN build label that mismatches the sdist filename and forces pip
to cascade through every release.
Auto Trait Implementations§
impl Freeze for VllmInstaller
impl RefUnwindSafe for VllmInstaller
impl Send for VllmInstaller
impl Sync for VllmInstaller
impl Unpin for VllmInstaller
impl UnsafeUnpin for VllmInstaller
impl UnwindSafe for VllmInstaller
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more