Update page.tsx

This commit is contained in:
MacRimi 2025-02-16 17:28:01 +01:00 committed by GitHub
parent 0b246fe3dd
commit 653abb7165
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,123 +1,76 @@
import type { Metadata } from "next"
import { Steps } from "@/components/ui/steps"
export const metadata: Metadata = {
title: "Add HW iGPU acceleration to an LXC | ProxMenux Documentation",
description:
"Learn how to configure Intel iGPU acceleration for an LXC container in Proxmox VE using ProxMenux. This guide covers the setup process, required modifications, and driver installation.",
title: "HW iGPU Acceleration to an LXC | ProxMenux Documentation",
description: "Learn how to enable hardware iGPU acceleration for an LXC container in Proxmox VE using ProxMenux.",
}
export default function IGPUAccelerationLXC() {
return (
<div className="max-w-3xl mx-auto">
<h1 className="text-3xl font-bold mb-6">Enable Intel iGPU in an LXC</h1>
<h1 className="text-3xl font-bold mb-6">HW iGPU Acceleration to an LXC</h1>
<p className="mb-4">
This guide explains how to enable Intel Integrated GPU (iGPU) support in LXC containers within Proxmox VE using
ProxMenux. The script automates the configuration, ensuring the container has access to GPU resources for
hardware-accelerated tasks such as video transcoding, rendering, and OpenCL applications.
This guide explains how ProxMenux helps you enable Intel Integrated GPU (iGPU) acceleration for LXC containers
in Proxmox VE. This feature allows your containers to use the host's Intel GPU for tasks like video transcoding,
rendering, and accelerating graphics-intensive applications.
</p>
<h2 className="text-2xl font-bold mb-4">🔹 What This Script Does</h2>
<ul className="list-disc list-inside mb-4">
<li>Lists available LXC containers and allows the user to select one.</li>
<li>Validates the selected container and ensures it is properly stopped before making changes.</li>
<li>Configures the LXC container to enable Intel iGPU access.</li>
<li>Modifies the container configuration to allow GPU passthrough.</li>
<li>Ensures the container is privileged for proper hardware access.</li>
<li>Installs necessary iGPU drivers inside the container.</li>
<li>Sets permissions for `/dev/dri` to allow GPU access.</li>
<h2 className="text-2xl font-semibold mt-8 mb-4">What Does This Script Do?</h2>
<p className="mb-4">When you run this script through ProxMenux, it performs the following actions:</p>
<ol className="list-decimal pl-6 space-y-2 mb-6">
<li>Presents a list of your LXC containers for you to choose from</li>
<li>Configures the selected container to support iGPU acceleration</li>
<li>Installs necessary drivers and tools inside the container</li>
</ol>
<h2 className="text-2xl font-semibold mt-8 mb-4">Key Steps</h2>
<Steps>
<Steps.Step title="Container Selection">
<p>You'll be prompted to select the LXC container you want to enable iGPU acceleration for.</p>
</Steps.Step>
<Steps.Step title="Container Configuration">
<p>The script modifies the container's configuration to allow iGPU access. This includes:</p>
<ul className="list-disc pl-6 space-y-1 mt-2">
<li>Ensuring the container is privileged (for necessary permissions)</li>
<li>Enabling nesting feature</li>
<li>Adding device permissions for GPU access</li>
<li>Setting up proper mounts for GPU devices</li>
</ul>
</Steps.Step>
<Steps.Step title="Driver Installation">
<p>Inside the container, the script installs required packages:</p>
<ul className="list-disc pl-6 space-y-1 mt-2">
<li>GPU drivers (va-driver-all)</li>
<li>OpenCL libraries</li>
<li>Intel GPU tools</li>
</ul>
</Steps.Step>
<Steps.Step title="Permission Setup">
<p>The script sets up proper permissions for GPU access within the container.</p>
</Steps.Step>
</Steps>
<h2 className="text-2xl font-semibold mt-8 mb-4">What to Expect</h2>
<ul className="list-disc pl-6 space-y-2 mb-6">
<li>The script will guide you through the process with clear prompts.</li>
<li>Your selected container will be stopped briefly during configuration.</li>
<li>The entire process usually takes a few minutes to complete.</li>
<li>After completion, your container will be ready to use the host's iGPU.</li>
</ul>
<h2 className="text-2xl font-bold mb-4">🛠 Prerequisites</h2>
<ul className="list-disc list-inside mb-4">
<li>Proxmox VE installed and running.</li>
<li>An LXC container created and available.</li>
<li>An Intel iGPU compatible with VA-API and OpenCL.</li>
<li>ProxMenux installed and updated.</li>
<h2 className="text-2xl font-semibold mt-8 mb-4">Important Notes</h2>
<ul className="list-disc pl-6 space-y-2 mb-6">
<li>This script is designed for Intel iGPUs. It may not work with other GPU types.</li>
<li>The container will be changed to privileged mode if it wasn't already.</li>
<li>Ensure your Proxmox host has the necessary Intel GPU drivers installed.</li>
<li>Some applications inside the container may require additional setup to utilize the GPU.</li>
</ul>
<h2 className="text-2xl font-bold mb-4"> How to Use</h2>
<p className="mb-4">
To enable Intel iGPU support for an LXC container, run the following command from ProxMenux:
</p>
<pre className="bg-gray-900 text-white p-4 rounded-md overflow-auto mb-4">
./proxmenux.sh --enable-igpu
</pre>
<p className="mb-4">
This will launch an interactive menu where you can select an LXC container. The script will then apply the
necessary configurations and install required drivers.
</p>
<h2 className="text-2xl font-bold mb-4">🔧 Script Breakdown</h2>
<h3 className="text-xl font-semibold mt-4 mb-2">1 Select an LXC Container</h3>
<p className="mb-4">
The script lists all available LXC containers and allows the user to choose one. If no container is selected or
available, it exits with an error.
</p>
<h3 className="text-xl font-semibold mt-4 mb-2">2 Validate and Stop the Container</h3>
<p className="mb-4">
Before applying modifications, the script ensures that the container is stopped. If it is running, it is
automatically stopped to prevent conflicts.
</p>
<h3 className="text-xl font-semibold mt-4 mb-2">3 Configure the LXC Container</h3>
<p className="mb-4">
The script modifies the container configuration file (`/etc/pve/lxc/[ID].conf`) to:
</p>
<ul className="list-disc list-inside mb-4">
<li>Ensure the container is **privileged**.</li>
<li>Add GPU-related permissions (`cgroup2.devices.allow`).</li>
<li>Mount `/dev/dri` and `/dev/fb0` for GPU access.</li>
</ul>
<h3 className="text-xl font-semibold mt-4 mb-2">4 Install iGPU Drivers</h3>
<p className="mb-4">
The script starts the container and installs essential Intel iGPU drivers, including:
</p>
<pre className="bg-gray-900 text-white p-4 rounded-md overflow-auto mb-4">
apt-get install -y va-driver-all ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools
</pre>
<p className="mb-4">
It also ensures that necessary user permissions are applied for access to `/dev/dri`.
</p>
<h2 className="text-2xl font-bold mb-4">🎯 Expected Outcome</h2>
<p className="mb-4">
Once the script finishes, the LXC container will have Intel iGPU access enabled, allowing applications inside
the container to leverage hardware acceleration for graphics and compute tasks.
</p>
<h2 className="text-2xl font-bold mb-4">📌 Notes</h2>
<ul className="list-disc list-inside mb-4">
<li>This script modifies the LXC container's configuration. Always back up your settings before proceeding.</li>
<li>Ensure that your Proxmox host has the necessary drivers installed for Intel iGPU support.</li>
<li>For troubleshooting, check logs inside the container after running the script.</li>
</ul>
<h2 className="text-2xl font-bold mb-4">📖 Additional Resources</h2>
<ul className="list-disc list-inside mb-4">
<li>
<a href="https://pve.proxmox.com/wiki/Linux_Containers" className="text-blue-400 hover:underline">
Proxmox LXC Documentation
</a>
</li>
<li>
<a href="https://pve.proxmox.com/wiki/PCI_Passthrough" className="text-blue-400 hover:underline">
PCI Passthrough Guide
</a>
</li>
</ul>
<p className="text-gray-400 mt-6">
If you encounter issues or have suggestions, consider contributing to the
<a
href="https://github.com/MacRimi/ProxMenux"
className="text-blue-400 hover:underline ml-1"
>
ProxMenux GitHub repository
</a>
.
<p className="mt-6 italic">
By using this ProxMenux script, you can easily enable iGPU acceleration in your LXC containers without needing
to manually edit configuration files or run complex commands.
</p>
</div>
)