import type { Metadata } from "next" import { getTranslations, getMessages, setRequestLocale } from "next-intl/server" import { ExternalLink } from "lucide-react" import { DocHeader } from "@/components/ui/doc-header" import { Callout } from "@/components/ui/callout" import Image from "next/image" import CopyableCode from "@/components/CopyableCode" import Footer from "@/components/footer" export async function generateMetadata({ params, }: { params: Promise<{ locale: string }> }): Promise { const { locale } = await params const t = await getTranslations({ locale, namespace: "guides.nvidiaManual.meta" }) return { title: t("title"), description: t("description"), alternates: { canonical: "https://proxmenux.com/docs/guides/nvidia-manual" }, openGraph: { title: t("ogTitle"), description: t("ogDescription"), type: "article", url: "https://proxmenux.com/docs/guides/nvidia-manual", }, } } export default async function NvidiaManualGuide({ params, }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations({ locale, namespace: "guides.nvidiaManual" }) const messages = (await getMessages({ locale })) as unknown as { guides: { nvidiaManual: { intro: { steps: string[] } lxcSetup: { tableRows: { device: string; major: string }[] } troubleshoot: { items: string[] } } } } const introSteps = messages.guides.nvidiaManual.intro.steps const tableRows = messages.guides.nvidiaManual.lxcSetup.tableRows const troubleItems = messages.guides.nvidiaManual.troubleshoot.items const code = (chunks: React.ReactNode) => {chunks} const strong = (chunks: React.ReactNode) => {chunks} const em = (chunks: React.ReactNode) => {chunks} const patchLink = (chunks: React.ReactNode) => ( {chunks} ) return (
{t.rich("intro.calloutBody", { strong, em })}

{t.rich("intro.targetNote", { strong })}

{t("intro.stepsTitle")}

    {introSteps.map((_, idx) => (
  1. {t(`intro.steps.${idx}`)}
  2. ))}
{/* Section 1 - Prepare host */}

{t("prepareHost.heading")}

{t("prepareHost.blacklistHeading")}

{t.rich("prepareHost.blacklistBody", { code })}

{t.rich("prepareHost.blacklistAdd", { code })}

{t("prepareHost.blacklistImageAlt")}

{t("prepareHost.reposHeading")}

{t("prepareHost.reposBody")}

{t("prepareHost.reposOtherwise")}

{t("prepareHost.reposPveBody")}

{t.rich("prepareHost.reposDebianBody", { code })}

{t("prepareHost.updateHeading")}

{t("prepareHost.buildToolsBody")}

{/* Section 2 - Install driver */}

{t("installDriver.heading")}

{t("installDriver.pickHeading")}

{t("installDriver.pickBody")}

{t.rich("installDriver.nvencCallout", { patchLink })}

{t.rich("installDriver.pickReplace", { code })}

{t("installDriver.pickImageAlt")}

{t.rich("installDriver.pickVersionNote", { code })}

{t("installDriver.downloadHeading")}

{t.rich("installDriver.firstPassBody", { code })}

{t("installDriver.secondPassBody")}

{t("installDriver.modulesHeading")}

{t("installDriver.modulesBody")}

{t("installDriver.modulesAddBody")}

{t.rich("installDriver.modulesSaveBody", { code })}

{t("installDriver.udevHeading")}

{t.rich("installDriver.udevBody", { code })}

{t.rich("installDriver.udevSaveBody", { code })}

{/* Section 3 - Persistence */}

{t("persistence.heading")}

{t("persistence.body")}

{t("persistence.verifyBody")}

{t("persistence.smiImageAlt")} {t("persistence.serviceImageAlt")} {/* Section 4 - NVENC */}

{t("nvenc.heading")}

{t("nvenc.body")}

{t("nvenc.imageAlt")}

{t.rich("nvenc.after", { code })}

{/* Section 5 - LXC setup */}

{t("lxcSetup.heading")}

{t("lxcSetup.identifyHeading")}

{t("lxcSetup.identifyBody")}

{t("lxcSetup.identifyImageAlt")}

{t("lxcSetup.identifyNote")}

{tableRows.map((_, idx) => ( ))}
{t("lxcSetup.tableHeaders.device")} {t("lxcSetup.tableHeaders.major")}
{t.rich(`lxcSetup.tableRows.${idx}.device`, { code })} {t.rich(`lxcSetup.tableRows.${idx}.major`, { code })}

{t("lxcSetup.editHeading")}

{t.rich("lxcSetup.editBody", { code })}

{t.rich("lxcSetup.editConfigBody", { code, strong })}

{t("lxcSetup.editConfigImageAlt")}

{t.rich("lxcSetup.editSave", { code })}

{t("lxcSetup.installCtHeading")}

{t.rich("lxcSetup.installCtCalloutBody", { strong })}

{t("lxcSetup.installCtBody")}

{t("lxcSetup.installCtAfter")}

{t("lxcSetup.installCtImageAlt")}

{t("lxcSetup.verifyCtHeading")}

{t("lxcSetup.verifyCtSmiImageAlt")} {t("lxcSetup.verifyCtLsImageAlt")}

{t("lxcSetup.verifyCtAfter")}

{t("lxcSetup.workloadHeading")}

{t("lxcSetup.workloadBody")}

{t("lxcSetup.workloadImage1Alt")} {t("lxcSetup.workloadImage2Alt")}

{t.rich("lxcSetup.repeatNote", { strong })}

{/* Section 6 - Docker */}

{t("docker.heading")}

{t.rich("docker.body", { code })}

{t("docker.after")}

{/* Troubleshooting */}

{t("troubleshoot.heading")}

    {troubleItems.map((_, idx) => (
  • {t.rich(`troubleshoot.items.${idx}`, { code, strong })}
  • ))}
) }