Improve ISO installer non-GPU and bundled setup flow
This commit is contained in:
1 parent
82cd52a409
commit
ec296b3d42
7 files changed
+148
-25
No files matched your search
+29
-6
@@ -52,6 +52,20 @@ install_ansible() {
|
||||
echo "✓ Ansible ready"
|
||||
}
|
||||
|
||||
has_nvidia_pci_gpu() {
|
||||
for vendor_file in /sys/bus/pci/devices/*/vendor; do
|
||||
[ -f "$vendor_file" ] || continue
|
||||
if [ "$(tr '[:upper:]' '[:lower:]' < "$vendor_file")" = "0x10de" ]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
has_working_nvidia_driver() {
|
||||
command -v nvidia-smi &>/dev/null && nvidia-smi &>/dev/null
|
||||
}
|
||||
|
||||
# ── Phase 1: NVIDIA drivers only ──────────────
|
||||
run_phase1() {
|
||||
echo ""
|
||||
@@ -59,6 +73,13 @@ run_phase1() {
|
||||
echo "║ Cezen AI Suite — Phase 1: NVIDIA ║"
|
||||
echo "╚══════════════════════════════════════════╝"
|
||||
|
||||
if ! has_nvidia_pci_gpu; then
|
||||
echo "No NVIDIA GPU found. Continuing with CPU/non-GPU installation path."
|
||||
PHASE="2"
|
||||
run_phase2
|
||||
return
|
||||
fi
|
||||
|
||||
ANSIBLE_STDOUT_CALLBACK=yaml \
|
||||
ansible-playbook -i localhost, -c local "$ANSIBLE_DIR/phase1_nvidia.yml" \
|
||||
-e "tier=$TIER"
|
||||
@@ -72,7 +93,7 @@ Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/bash ${SCRIPT_DIR}/install.sh --phase=2 --tier=${TIER}
|
||||
ExecStart=/bin/bash -lc 'set -o pipefail; /bin/bash ${SCRIPT_DIR}/install.sh --phase=2 --tier=${TIER} 2>&1 | tee -a /var/log/cezen-install.log'
|
||||
RemainAfterExit=yes
|
||||
StandardOutput=journal+console
|
||||
StandardError=journal+console
|
||||
@@ -98,17 +119,19 @@ run_phase2() {
|
||||
echo "║ Cezen AI Suite — Phase 2: Stack ║"
|
||||
echo "╚══════════════════════════════════════════╝"
|
||||
|
||||
# Verify NVIDIA driver loaded
|
||||
if ! nvidia-smi &>/dev/null; then
|
||||
echo "WARNING: nvidia-smi not responding. NVIDIA driver may not be loaded."
|
||||
echo " Continuing — non-GPU roles will still install correctly."
|
||||
GPU_AVAILABLE=false
|
||||
if ! has_working_nvidia_driver; then
|
||||
echo "No working NVIDIA GPU/driver found. Continuing with CPU/non-GPU installation path."
|
||||
echo "GPU-only features such as NVIDIA Docker runtime, DCGM metrics, and vLLM serving will be skipped or left inactive."
|
||||
else
|
||||
GPU_AVAILABLE=true
|
||||
echo "✓ NVIDIA driver: $(nvidia-smi --query-gpu=driver_version --format=csv,noheader | head -1)"
|
||||
fi
|
||||
|
||||
# Build skip_roles extra var (comma-separated list, empty string = skip nothing)
|
||||
EXTRA_VARS="tier=$TIER skip_roles=\"$SKIP_ROLES\""
|
||||
EXTRA_VARS="tier=$TIER skip_roles=\"$SKIP_ROLES\" gpu_available=$GPU_AVAILABLE"
|
||||
echo "→ Tier: $TIER | Skip: ${SKIP_ROLES:-none}"
|
||||
echo "→ GPU available: $GPU_AVAILABLE"
|
||||
|
||||
ANSIBLE_STDOUT_CALLBACK=yaml \
|
||||
ansible-playbook -i localhost, -c local "$ANSIBLE_DIR/entry.yml" \
|
||||
|
||||
Reference in new issue
Block a user