pub struct VllmStudioInstaller { /* private fields */ }Expand description
The vLLM Studio installer.
Implementations§
Source§impl VllmStudioInstaller
impl VllmStudioInstaller
Sourcepub fn new(config: VllmStudioConfig) -> Self
pub fn new(config: VllmStudioConfig) -> Self
Create a new vLLM Studio installer with the given config.
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create with default config.
Sourcepub fn build_git_clone_command(&self) -> ShellCommand
pub fn build_git_clone_command(&self) -> ShellCommand
Construct the git clone command for vLLM Studio.
The original script runs:
git clone "https://github.com/0xSero/vllm-studio.git" "$VLLM_STUDIO_DIR"
Sourcepub fn build_git_update_commands(&self) -> Vec<ShellCommand>
pub fn build_git_update_commands(&self) -> Vec<ShellCommand>
Construct the git update commands for an existing clone.
The original script runs:
git -C "$DIR" remote set-head origin -agit -C "$DIR" checkout "$DEFAULT_BRANCH"git -C "$DIR" fetch --allgit -C "$DIR" reset --hard "origin/$DEFAULT_BRANCH"
Sourcepub fn detect_pkg_manager(&self) -> Option<String>
pub fn detect_pkg_manager(&self) -> Option<String>
Detect which package manager to use (bun preferred, npm fallback).
Sourcepub fn build_pkg_install_command(&self, pkg_mgr: &str) -> ShellCommand
pub fn build_pkg_install_command(&self, pkg_mgr: &str) -> ShellCommand
Construct the package install command for controller/frontend.
Sourcepub fn build_frontend_build_command(&self, pkg_mgr: &str) -> ShellCommand
pub fn build_frontend_build_command(&self, pkg_mgr: &str) -> ShellCommand
Construct the frontend build command.
Sourcepub fn build_shim_content(&self, pkg_mgr: &str) -> String
pub fn build_shim_content(&self, pkg_mgr: &str) -> String
Construct the shim creation command.
Creates a shell script at /usr/local/bin/vllm-studio that
runs cd "$DIR/controller" && $PKG_MGR run start.
Sourcepub fn install_dir(&self) -> &str
pub fn install_dir(&self) -> &str
Get the install directory.
Sourcepub fn default_branch(&self) -> &str
pub fn default_branch(&self) -> &str
Get the default branch.
Auto Trait Implementations§
impl Freeze for VllmStudioInstaller
impl RefUnwindSafe for VllmStudioInstaller
impl Send for VllmStudioInstaller
impl Sync for VllmStudioInstaller
impl Unpin for VllmStudioInstaller
impl UnsafeUnpin for VllmStudioInstaller
impl UnwindSafe for VllmStudioInstaller
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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