diff --git a/scripts/configure_igpu_lxc.sh b/scripts/configure_igpu_lxc.sh index f3a90ea..8859c41 100644 --- a/scripts/configure_igpu_lxc.sh +++ b/scripts/configure_igpu_lxc.sh @@ -41,7 +41,7 @@ select_container() { fi CONTAINER_ID=$(whiptail --title "$(translate 'Select Container')" \ - --menu "$(translate 'Select the LXC container:')" 15 60 5 $CONTAINERS 3>&1 1>&2 2>&3) + --menu "$(translate 'Select the LXC container:')" 15 60 8 $CONTAINERS 3>&1 1>&2 2>&3) if [ -z "$CONTAINER_ID" ]; then msg_error "$(translate 'No container selected. Exiting.')" @@ -95,6 +95,15 @@ configure_lxc_for_igpu() { msg_ok "$(translate 'Container changed to privileged.')" fi + + if grep -q "^lxc.apparmor.profile" "$CONFIG_FILE"; then + msg_info "$(translate 'Disabling AppArmor profile to avoid conflicts...')" + sed -i "/^lxc.apparmor.profile/d" "$CONFIG_FILE" + msg_ok "$(translate 'AppArmor profile removed.')" + fi + + + # Configure iGPU if ! grep -q "features: nesting=1" "$CONFIG_FILE"; then echo "features: nesting=1" >> "$CONFIG_FILE" @@ -128,12 +137,12 @@ install_igpu_in_container() { tput sc LOG_FILE=$(mktemp) - pct start "$CONTAINER_ID" + msg_info "$(translate 'Installing iGPU drivers...')" + pct start "$CONTAINER_ID" >/dev/null 2>&1 + script -q -c "pct exec \"$CONTAINER_ID\" -- bash -c ' set -e - echo \"- Updating package lists...\" - apt-get update - echo \"- Installing iGPU drivers...\" + apt-get update >/dev/null 2>&1 apt-get install -y va-driver-all ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools chgrp video /dev/dri && chmod 755 /dev/dri adduser root video && adduser root render @@ -161,5 +170,5 @@ configure_lxc_for_igpu install_igpu_in_container -msg_ok "$(translate 'iGPU configuration completed in container') $CONTAINER_ID." +msg_success "$(translate 'iGPU configuration completed in container') $CONTAINER_ID." sleep 2 diff --git a/web/app/docs/hardware/coral-tpu-lxc/page.tsx b/web/app/docs/hardware/coral-tpu-lxc/page.tsx index b468c04..0a04470 100644 --- a/web/app/docs/hardware/coral-tpu-lxc/page.tsx +++ b/web/app/docs/hardware/coral-tpu-lxc/page.tsx @@ -1,87 +1,83 @@ -import type { Metadata } from "next" -import { Steps } from "@/components/ui/steps" +"use client" -export const metadata: Metadata = { - title: "Coral TPU to an LXC | ProxMenux Documentation", - description: "Learn how to add Coral TPU support to an LXC container in Proxmox VE.", +import { Steps } from "@/components/ui/steps" +import CopyableCode from "@/components/CopyableCode" +import Image from "next/image" + +export const metadata = { + title: "Enable Coral TPU in LXC | ProxMenux Documentation", + description: "Step-by-step guide to enable Google Coral TPU support in an LXC container using ProxMenux.", } export default function CoralTPULXC() { return (
- This script automates the process of adding Google Coral TPU (Tensor Processing Unit) support to LXC containers - in Proxmox VE. It configures containers to leverage the power of Coral TPU for AI and machine learning tasks, - significantly accelerating inference operations. + This guide explains how to configure Google Coral TPU support for LXC containers in Proxmox VE using ProxMenux. + Coral TPU provides dedicated AI acceleration, improving inference performance for machine learning applications.
- -When executed, this script performs the following actions:
+ +The script automates the following steps:
You'll be prompted to select the LXC container you want to enable Coral TPU support for.
+The script lists available LXC containers and prompts for selection.
The script modifies the container's configuration to allow Coral TPU and iGPU access. This includes:
+The script applies necessary changes to enable Coral TPU:
Inside the container, the script installs required packages:
+The script installs the necessary components inside the container:
- If a Coral M.2 device is detected, you'll be prompted to choose between standard and maximum performance - drivers. -
+If a Coral M.2 device is detected, the script prompts the user to select:
+- This script simplifies the process of enabling Coral TPU and iGPU acceleration in your LXC containers without - the need for manual configuration file editing or running complex commands. This setup is ideal for AI and - machine learning workloads that can benefit from hardware acceleration. + By using ProxMenux, Coral TPU and iGPU support can be enabled in LXC containers efficiently, avoiding manual configuration steps.
- By using ProxMenux, you can enable iGPU acceleration in your LXC containers easily, without manual configuration. -
) }