feat: improve backend detection summary in LocalAGI installation scripts
This commit is contained in:
@@ -62,9 +62,8 @@ resolve_backend() {
|
|||||||
;;
|
;;
|
||||||
esac
|
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}"
|
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}"
|
||||||
echo "$backend"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Update or append a key=value pair inside LocalAGI environment file.
|
# Update or append a key=value pair inside LocalAGI environment file.
|
||||||
@@ -212,7 +211,9 @@ function update_script() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Re-evaluate backend each update in case hardware/override changed.
|
# 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
|
if [[ ! -f /opt/localagi/.env ]]; then
|
||||||
msg_warn "Missing /opt/localagi/.env. Recreate by running install script again."
|
msg_warn "Missing /opt/localagi/.env. Recreate by running install script again."
|
||||||
exit
|
exit
|
||||||
|
|||||||
@@ -59,9 +59,8 @@ resolve_backend() {
|
|||||||
;;
|
;;
|
||||||
esac
|
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}"
|
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}"
|
||||||
echo "$backend"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Build LocalAGI from source using upstream workflow:
|
# 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"
|
msg_ok "Fetched LocalAGI Source"
|
||||||
|
|
||||||
# Resolve backend and prepare persistent state directory.
|
# 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
|
mkdir -p /opt/localagi/pool
|
||||||
|
|
||||||
# Only attempt ROCm runtime provisioning when AMD backend is selected.
|
# Only attempt ROCm runtime provisioning when AMD backend is selected.
|
||||||
|
|||||||
Reference in New Issue
Block a user