Files
ProxMenux/scripts/menus/hw_grafics_menu.sh

59 lines
2.0 KiB
Bash
Raw Normal View History

2025-01-30 16:55:58 +01:00
#!/bin/bash
# ==========================================================
2025-09-10 18:47:55 +02:00
# ProxMenux - A menu-driven script for Proxmox VE management
2025-01-30 16:55:58 +01:00
# ==========================================================
# Author : MacRimi
# Copyright : (c) 2024 MacRimi
2025-11-01 00:10:46 +01:00
# License : (CC BY-NC 4.0) (https://github.com/MacRimi/ProxMenux/blob/main/LICENSE)
2025-01-30 16:55:58 +01:00
# Version : 1.0
# Last Updated: 28/01/2025
# ==========================================================
2025-01-31 22:02:33 +01:00
# Configuration ============================================
LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts"
2025-01-30 16:55:58 +01:00
BASE_DIR="/usr/local/share/proxmenux"
2025-02-01 08:52:19 +01:00
UTILS_FILE="$BASE_DIR/utils.sh"
2025-01-30 16:55:58 +01:00
VENV_PATH="/opt/googletrans-env"
2025-02-01 08:52:19 +01:00
if [[ -f "$UTILS_FILE" ]]; then
source "$UTILS_FILE"
2025-01-30 16:55:58 +01:00
fi
2025-01-31 22:14:38 +01:00
load_language
2025-02-01 08:52:19 +01:00
initialize_cache
2025-01-31 22:02:33 +01:00
# ==========================================================
2025-01-30 16:55:58 +01:00
while true; do
2025-06-10 14:29:34 +02:00
OPTION=$(dialog --clear --backtitle "ProxMenux" --title "$(translate "GPUs and Coral-TPU Menu")" \
--menu "\n$(translate "Select an option:")" 20 70 8 \
"1" "$(translate "Add HW iGPU acceleration to an LXC")" \
"2" "$(translate "Add Coral TPU to an LXC")" \
"3" "$(translate "Install/Update Coral TPU on the Host")" \
"4" "$(translate "Return to Main Menu")" \
2>&1 >/dev/tty)
2025-01-30 16:55:58 +01:00
case $OPTION in
1)
bash "$LOCAL_SCRIPTS/configure_igpu_lxc.sh"
2025-01-30 16:55:58 +01:00
if [ $? -ne 0 ]; then
2025-07-02 17:57:25 +02:00
return
2025-01-30 16:55:58 +01:00
fi
;;
2)
bash "$LOCAL_SCRIPTS/install_coral_lxc.sh"
2025-01-31 20:34:34 +01:00
if [ $? -ne 0 ]; then
2025-07-02 17:57:25 +02:00
return
2025-01-31 20:34:34 +01:00
fi
;;
3)
bash "$LOCAL_SCRIPTS/gpu_tpu/install_coral_pve9.sh"
2025-01-30 16:55:58 +01:00
if [ $? -ne 0 ]; then
2025-07-02 17:57:25 +02:00
return
2025-01-30 16:55:58 +01:00
fi
;;
4) exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" ;;
*) exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" ;;
2025-01-30 16:55:58 +01:00
esac
done