feat: enhance ROCm installation process and backend resolution in LocalAGI scripts

This commit is contained in:
John Doe
2026-03-04 00:18:51 -05:00
parent 55de0ad144
commit 63615ded07
2 changed files with 16 additions and 6 deletions

View File

@@ -132,9 +132,9 @@ Pin: release o=repo.radeon.com
Pin-Priority: 600
EOF
msg_info "Installing ROCm runtime packages"
$STD apt update || return 1
$STD apt install -y rocm || return 1
msg_info "Installing ROCm runtime packages (this may take several minutes)"
apt update || return 1
apt install -y rocm || return 1
ldconfig || true
msg_ok "Installed ROCm runtime packages"
}
@@ -211,9 +211,11 @@ function update_script() {
fi
# Re-evaluate backend each update in case hardware/override changed.
msg_info "Resolving LocalAGI backend"
resolve_backend
BACKEND="${RESOLVED_BACKEND:-cpu}"
msg_info "Backend detection: ${BACKEND_DETECTION_SUMMARY:-unavailable}"
msg_ok "Resolved LocalAGI backend: ${BACKEND}"
if [[ ! -f /opt/localagi/.env ]]; then
msg_warn "Missing /opt/localagi/.env. Recreate by running install script again."
exit

View File

@@ -175,9 +175,15 @@ Pin: release o=repo.radeon.com
Pin-Priority: 600
EOF
msg_info "Installing ROCm runtime packages"
retry_cmd 3 5 apt_update_cmd || return 1
install_apt_packages_resilient rocm || return 1
msg_info "Installing ROCm runtime packages (this may take several minutes)"
if ! retry_cmd 3 5 apt update; then
msg_warn "ROCm apt repository update failed"
return 1
fi
if ! retry_cmd 3 10 apt install -y rocm; then
msg_warn "ROCm runtime package installation failed"
return 1
fi
ldconfig || true
msg_ok "Installed ROCm runtime packages"
}
@@ -213,10 +219,12 @@ CLEAN_INSTALL=1 fetch_and_deploy_gh_release "localagi" "mudler/LocalAGI" "tarbal
msg_ok "Fetched LocalAGI Source"
# Resolve backend and prepare persistent state directory.
msg_info "Resolving LocalAGI backend"
resolve_backend
BACKEND="${RESOLVED_BACKEND:-cpu}"
msg_info "Backend detection: ${BACKEND_DETECTION_SUMMARY:-unavailable}"
mkdir -p /opt/localagi/pool
msg_ok "Resolved LocalAGI backend: ${BACKEND}"
# Only attempt ROCm runtime provisioning when AMD backend is selected.
if [[ "${BACKEND}" == "rocm7.2" ]]; then