This commit is contained in:
MacRimi
2025-02-13 23:04:40 +01:00
parent a9a89b5b46
commit 990b2bf7de
137 changed files with 7536 additions and 219 deletions

View File

@@ -3,30 +3,21 @@ import path from "path"
import { remark } from "remark"
import html from "remark-html"
// Function to retrieve the guide content based on the slug
async function getGuideContent(slug: string) {
// Adjusted to look inside the correct 'guides' folder at the root level of the project
const guidePath = path.join(process.cwd(), "..", "guides", slug, "index.md") // Corrected to look in the root directory
const guidePath = path.join(process.cwd(), "guides", `${slug}.md`)
const fileContents = fs.readFileSync(guidePath, "utf8")
const result = await remark().use(html).process(fileContents)
return result.toString()
}
// Function to generate static paths for all available guides
export async function generateStaticParams() {
// Adjusted to look in the correct 'guides' folder at the root level of the project
const guidesPath = path.join(process.cwd(), "..", "guides")
const guideFolders = fs.readdirSync(guidesPath, { withFileTypes: true }) // Read only directories
return guideFolders
.filter((folder) => folder.isDirectory()) // Ensure it's a directory
.map((folder) => ({
slug: folder.name, // Use the folder name as slug
}))
const guideFiles = fs.readdirSync(path.join(process.cwd(), "guides"))
return guideFiles.map((file) => ({
slug: file.replace(/\.md$/, ""),
}))
}
// Page component to render a guide based on its slug
export default async function GuidePage({ params }: { params: { slug: string } }) {
const guideContent = await getGuideContent(params.slug)
@@ -36,3 +27,4 @@ export default async function GuidePage({ params }: { params: { slug: string } }
</div>
)
}

View File

@@ -0,0 +1,52 @@
# Setting up NVIDIA Drivers on Proxmox VE with GPU Passthrough
This guide explains how to install and configure NVIDIA drivers on your Proxmox VE host and enable GPU passthrough to your virtual machines. This allows you to leverage the power of your NVIDIA GPU within your VMs for tasks like machine learning, gaming, or video editing.
## Prerequisites
Before you begin, ensure you have the following:
* A Proxmox VE server with an NVIDIA GPU installed.
* Access to the Proxmox VE command line interface (CLI) via SSH.
* A basic understanding of Proxmox VE and virtual machine management.
## Installing the NVIDIA Driver on the Proxmox VE Host
This step involves installing the NVIDIA driver on your Proxmox VE host operating system. The exact steps may vary slightly depending on your Proxmox VE version and the specific NVIDIA GPU you are using. Consult the official NVIDIA documentation for the most up-to-date instructions.
Generally, you will need to download the appropriate driver package from the NVIDIA website and then install it using the package manager for your distribution.
## Enabling GPU Passthrough
Once the NVIDIA driver is installed, you need to enable GPU passthrough for your virtual machines. This involves assigning the GPU to a specific VM.
1. **Identify your GPU:** Use the `lspci` command to identify the PCI address of your NVIDIA GPU. The output will look something like this:
\`\`\`bash
01:00.0 VGA compatible controller: NVIDIA Corporation ...
\`\`\`
Note the `01:00.0` part this is the PCI address.
2. **Create a VM:** Create a new virtual machine in Proxmox VE.
3. **Assign the GPU:** During the VM creation process, or afterwards using the VM's configuration, assign the NVIDIA GPU to the VM using the PCI address you identified earlier. This is typically done in the "Hardware" section of the VM's settings.
4. **Install the Guest Additions:** Once the VM is created, install the appropriate guest additions for your VM's operating system. This will ensure that the VM can properly utilize the passed-through GPU.
## Verifying GPU Passthrough
After completing these steps, boot your VM and verify that the NVIDIA GPU is working correctly. You can use tools like `nvidia-smi` (within the VM) to check the GPU status and utilization.
## Troubleshooting
If you encounter any issues, check the following:
* **Driver Installation:** Ensure the NVIDIA driver is correctly installed on the Proxmox VE host.
* **PCI Address:** Double-check that you have used the correct PCI address when assigning the GPU to the VM.
* **Guest Additions:** Make sure the appropriate guest additions are installed within the VM.
* **VM Configuration:** Verify that the VM's configuration is correct and that the GPU is properly assigned.
* **Proxmox VE Logs:** Check the Proxmox VE logs for any errors related to the GPU or VM.
This guide provides a general overview. For more detailed instructions and troubleshooting tips, refer to the official NVIDIA and Proxmox VE documentation.

View File

@@ -1,13 +1,11 @@
import Link from "next/link"
// Interface defining the structure of a guide
interface Guide {
title: string
description: string
slug: string
}
// Guide list (manually added, can be automated later)
const guides: Guide[] = [
{
title: "Setting up NVIDIA Drivers on Proxmox VE with GPU Passthrough",
@@ -16,14 +14,13 @@ const guides: Guide[] = [
slug: "nvidia_proxmox",
},
{
title: "Example Additional Guide",
description: "This is a sample guide to show how multiple guides are handled.",
title: "Ejemplo de Guía Adicional",
description: "Esta es una guía de ejemplo para mostrar cómo se manejan múltiples guías.",
slug: "example_guide",
},
// Add more guides as needed
// Añade más guías aquí según sea necesario
]
// Main component that renders the list of available guides
export default function GuidesPage() {
return (
<div className="container mx-auto px-4 py-16">
@@ -44,3 +41,4 @@ export default function GuidesPage() {
</div>
)
}