feat: improve backend detection summary in LocalAGI installation scripts

This commit is contained in:
John Doe
2026-03-04 00:14:13 -05:00
parent 565705e837
commit 55de0ad144
2 changed files with 10 additions and 8 deletions

View File

@@ -62,9 +62,8 @@ resolve_backend() {
;;
esac
msg_info "Backend detection: requested=${requested}, var_gpu=${var_gpu:-no}, GPU_TYPE=${gpu_type}, nvidia=${has_nvidia}, kfd=${has_kfd}, amd_pci=${has_amd_pci}, amd_vendor=${has_amd_vendor}, selected=${backend}"
echo "$backend"
RESOLVED_BACKEND="$backend"
BACKEND_DETECTION_SUMMARY="requested=${requested}, var_gpu=${var_gpu:-no}, GPU_TYPE=${gpu_type}, nvidia=${has_nvidia}, kfd=${has_kfd}, amd_pci=${has_amd_pci}, amd_vendor=${has_amd_vendor}, selected=${backend}"
}
# Update or append a key=value pair inside LocalAGI environment file.
@@ -212,7 +211,9 @@ function update_script() {
fi
# Re-evaluate backend each update in case hardware/override changed.
BACKEND="$(resolve_backend)"
resolve_backend
BACKEND="${RESOLVED_BACKEND:-cpu}"
msg_info "Backend detection: ${BACKEND_DETECTION_SUMMARY:-unavailable}"
if [[ ! -f /opt/localagi/.env ]]; then
msg_warn "Missing /opt/localagi/.env. Recreate by running install script again."
exit

View File

@@ -59,9 +59,8 @@ resolve_backend() {
;;
esac
msg_info "Backend detection: requested=${requested}, var_gpu=${var_gpu:-no}, GPU_TYPE=${gpu_type}, nvidia=${has_nvidia}, kfd=${has_kfd}, amd_pci=${has_amd_pci}, amd_vendor=${has_amd_vendor}, selected=${backend}"
echo "$backend"
RESOLVED_BACKEND="$backend"
BACKEND_DETECTION_SUMMARY="requested=${requested}, var_gpu=${var_gpu:-no}, GPU_TYPE=${gpu_type}, nvidia=${has_nvidia}, kfd=${has_kfd}, amd_pci=${has_amd_pci}, amd_vendor=${has_amd_vendor}, selected=${backend}"
}
# Build LocalAGI from source using upstream workflow:
@@ -214,7 +213,9 @@ CLEAN_INSTALL=1 fetch_and_deploy_gh_release "localagi" "mudler/LocalAGI" "tarbal
msg_ok "Fetched LocalAGI Source"
# Resolve backend and prepare persistent state directory.
BACKEND="$(resolve_backend)"
resolve_backend
BACKEND="${RESOLVED_BACKEND:-cpu}"
msg_info "Backend detection: ${BACKEND_DETECTION_SUMMARY:-unavailable}"
mkdir -p /opt/localagi/pool
# Only attempt ROCm runtime provisioning when AMD backend is selected.