User Tools

Site Tools


tech:linux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tech:linux [2026/06/14 23:46] glongtech:linux [2026/06/15 18:53] (current) glong
Line 3: Line 3:
 Ubunut 24.04 Ubunut 24.04
  
 +[[:tech:Linux:AI Setup]] \\
  
 +====== Install all drivers needed for using V100 on Ubuntu 24.04 LTS ======
  
-====== GeForce 210 Driver Override Guide ====== +Setting up an enterprise data center GPU like the NVIDIA V100 (Volta architecture) on **Ubuntu 24.04 LTS** requires the proprietary driver and the CUDA ToolkitSince the V100 is typically used in a headless server environment for compute, machine learning, and AI workloads, a **compute-only/headless driver installation** is idealThis avoids dragging in unnecessary graphical desktop packages.
-To configure a Driver Override for your GeForce 210, follow these steps to isolate the card from the proprietary NVIDIA driver and allow the open-source ''nouveau'' driver to manage the desktop display. +
-===== Step 1: Identify Device IDs ===== +
-Use ''lspci'' to find the exact Hardware IDs for your GeForce 210 at PCI address ''0000:01:00.0''.+
  
-lspci -nn | grep -i "GeForce 210" +Here is the cleanstreamlined method using the official NVIDIA network repositories for Ubuntu 24.04.
-Note the hexadecimal IDs (e.g.''10de:0a65'').+
  
-<code> +==== Step 1: Clean Up Existing Drivers ==== 
-root@test1:~# lspci -nn | grep "210" + 
-01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GT218 [GeForce 210] [10de:0a65] (rev a2)+To prevent conflicts with generic open-source or older drivers, remove any current installations: 
 + 
 +<code bash\
 +sudo apt-get purge 'nvidia\*' 'cuda\*' -y   
 +sudo apt-get autoremove -y  
 </code> </code>
  
-===== Step 2: Isolate the Card with pci-stub ===== +==== Step 2: Install Linux Kernel Headers ====
-Bind the device to ''pci-stub'' at boot time so the proprietary driver cannot claim it.+
  
-* Open your GRUB configuration:+Ensure you have the correct kernel headers installed so the NVIDIA kernel modules can compile properly:
  
-sudo nano /etc/default/grub +<code bash\> 
-* Append ''pci-stub.ids='' with your hardware IDs to ''GRUB_CMDLINE_LINUX_DEFAULT'':+sudo apt-get update   
 +sudo apt-get install linux-headers-$(uname -r) build-essential -y   
 +</code>
  
-GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci-stub.ids=10de:0a65" +==== Step 3Setup the NVIDIA & CUDA Network Repository ====
-* Update GRUB:+
  
-<code> +NVIDIA provides a repository pinned to Ubuntu 24.04 (noble). Fetch the repository configurations and GPG keys so apt can safely pull the latest stable packages: 
-root@test1:~grep GRUB_CMDLINE_LINUX_DEFAULT  /etc/default/grub + 
-GRUB_CMDLINE_LINUX_DEFAULT="pci-stub.ids=10de:0a65"+<code bash\
 + 
 +Download the repository pin file to set priority 
 + 
 +wget <https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86>\_64/cuda-ubuntu2404.pin   
 +sudo mv cuda-ubuntu2404.pin /etc/apt/preferences.d/cuda-repository-pin-600 
 + 
 +# Download and install the repository package 
 + 
 +wget <https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86>\_64/cuda-keyring\_1.1-1\_all.deb   
 +sudo dpkg -i cuda-keyring\_1.1-1\_all.deb 
 + 
 +# Update apt package listings 
 + 
 +sudo apt-get update  
 </code> </code>
  
-sudo update-grub+==== Step 4: Install the Drivers and CUDA Toolkit ====
  
-===== Step 3: Ensure nouveau is Loaded ===== +For enterprise cards like the V100, the stable branch (such as the nvidia-driver-550-server or nvidia-driver-565-server depending on repository syncs) is highly recommended.
-Ensure the open-source driver is not blacklisted and is forced to load at boot.+
  
-Remove any ''blacklist nouveau'' lines found in files within ''/etc/modprobe.d/''+To fetch the **headless, data-center optimal drivers** alongside the CUDA toolkit, run:
-Add ''nouveau'' to your modules list:+
  
-echo “nouveau” | sudo tee -a /etc/modules-load.d/modules.conf+<code bash\> 
 +sudo apt-get -y install cuda-toolkit-12-8 nvidia-headless-server-550 nvidia-utils-550   
 +</code>
  
-===== Step 4Manual Driver Override (Optional) ===== +*Note: If you plan on deploying Docker containers that utilize the V100you should install the container runtime package as well:* `sudo apt-get install -y nvidia-container-toolkit`
-If the card does not bind correctly after rebootingcreate a manual override script to forcibly unbind any driver and attach ''nouveau''.+
  
-#!/bin/bash +==== Step 5: Update Environment Variables ====
-## Unbind from any existing driver +
-echo "0000:01:00.0" > /sys/bus/pci/devices/0000:01:00.0/driver/unbind +
-## Force bind to nouveau +
-echo "nouveau" > /sys/bus/pci/devices/0000:01:00.0/driver_override +
-echo "0000:01:00.0" > /sys/bus/pci/drivers/nouveau/bind +
-===== Step 5: Verify Configuration ===== +
-Reboot your system and verify the kernel driver in use for each card.+
  
-lspci -nnk | grep -A 3 "VGA|3D" +To ensure your system paths find the CUDA binariesappend them to your shell configuration (\~/.bashrc):
-The GeForce 210 should show ''Kernel driver in use: nouveau'', while your V100s should remain under the ''nvidia'' driver. +
------------------------------- +
-Does this DokuWiki format work for your documentation needsor would you like to add more technical details about the V100 configuration as well?+
  
 +<code bash\>
 +echo 'export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}' \>\> \~/.bashrc  
 +echo 'export LD\_LIBRARY\_PATH=/usr/local/cuda/lib64${LD\_LIBRARY\_PATH:+:${LD\_LIBRARY\_PATH}}' \>\> \~/.bashrc  
 +source \~/.bashrc  
 +</code>
 +
 +==== Step 6: Reboot and Verify ====
 +
 +Restart the machine to initialize the newly compiled kernel modules:
 +
 +<code bash\>
 +sudo reboot  
 +</code>
 +
 +Once the system is back up, verify that the OS recognizes the V100 and that the drivers are operational:
 +
 +<code bash\>
 +nvidia-smi  
 +</code>
 +
 +You should see an output matrix detailing your V100, its current temperature, power consumption, and the driver/CUDA version currently running.
 +
 +
 +====== GeForce 210 Driver Override Guide ======
 +We cannot fix this the ''nouveau'' driver cannot live with the V100 NVidia driver
  
  
Line 167: Line 197:
  
 ===== 2. Install the NVIDIA Container Toolkit ===== ===== 2. Install the NVIDIA Container Toolkit =====
 +https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html
  
 Add the official package repositories and install the toolkit: Add the official package repositories and install the toolkit:
Line 174: Line 205:
 curl -fsSL https://github.io | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg curl -fsSL https://github.io | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
  
-curl -s -L https://github.io | \ +curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ 
-sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ +  && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \ 
-sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list+    sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ 
 +    sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list 
 + 
 +sudo sed -i -e '/experimental/ s/^#//g' /etc/apt/sources.list.d/nvidia-container-toolkit.list
  
 # Update package list and install # Update package list and install
 sudo apt-get update sudo apt-get update
-sudo apt-get install -y nvidia-container-toolkit+ 
 +export NVIDIA_CONTAINER_TOOLKIT_VERSION=1.19.1-1 
 +  sudo apt-get install -y 
 +      nvidia-container-toolkit=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \ 
 +      nvidia-container-toolkit-base=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \ 
 +      libnvidia-container-tools=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \ 
 +      libnvidia-container1=${NVIDIA_CONTAINER_TOOLKIT_VERSION} 
 </code> </code>
  
Line 200: Line 241:
  
 <code> <code>
-sudo docker run --rm --gpus all ubuntu nvidia-smi+docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi
 </code> </code>
  
Line 215: Line 256:
 If you plan to deploy enterprise-grade AI workloads, you can also authenticate your Docker client to the NVIDIA NGC Container Registry using an API key. This gives you direct access to fine-tuned, GPU-optimized AI models and microservices. If you plan to deploy enterprise-grade AI workloads, you can also authenticate your Docker client to the NVIDIA NGC Container Registry using an API key. This gives you direct access to fine-tuned, GPU-optimized AI models and microservices.
  
 +
 +====== Installing LM Studio on Ubuntu 24.04 ======
 +
 +To install LM Studio on Ubuntu 24.04 LTS, you have two primary options: the **headless lms daemon** (ideal for servers, command-line usage, or API orchestration) or the **AppImage** (for the full graphical interface).
 +
 +---
 +
 +===== Option 1: Headless Daemon (lms) =====
 +If you intend to use LM Studio for backend services, API hosting, or CI/CD, the ''lms'' daemon is the official, recommended approach.
 +
 +==== 1. Install the Daemon ====
 +Run the following command in your terminal to download and execute the official installer:
 +<code>
 +curl -fsSL https://lmstudio.ai/install.sh | bash
 +</code>
 +
 +==== 2. Usage ====
 +Once the installation script completes, you can interact with the service directly using the ''lms'' CLI.
 +
 +To start the background service:
 +<code>
 +lms daemon up
 +</code>
 +
 +**Note:** If you encounter an "Illegal instruction" error upon execution, ensure your system's ''libc'' and environment variables are fully updated. This can sometimes occur on bleeding-edge hardware configurations.
 +
 +---
 +
 +===== Option 2: Graphical AppImage (Full GUI) =====
 +If you require the standard LM Studio desktop interface, you must download the AppImage. Note that Ubuntu 24.04 enforces strict sandboxing rules that require manual adjustment.
 +
 +==== 1. Download and Make Executable ====
 +Download the latest Linux AppImage from the official LM Studio website, then give it execution permissions:
 +<code>
 +chmod +x LM_Studio-*.AppImage
 +</code>
 +
 +==== 2. Extract and Configure Sandbox ====
 +The application will likely fail to launch unless you fix the ''chrome-sandbox'' permissions. Extract the AppImage and update the owner permissions:
 +<code>
 +# Extract the AppImage
 +./LM_Studio-*.AppImage --appimage-extract
 +
 +# Navigate to the extracted folder
 +cd squashfs-root
 +
 +# Fix sandbox permissions
 +sudo chown root:root chrome-sandbox
 +sudo chmod 4755 chrome-sandbox
 +</code>
 +
 +==== 3. Launch the Application ====
 +You can now run the application from within the extracted directory:
 +<code>
 +./lm-studio
 +</code>
 +
 +If you still encounter sandboxing issues and prefer to bypass it, you can launch with the ''--no-sandbox'' flag (use with caution):
 +<code>
 +./lm-studio --no-sandbox
 +</code>
 +
 +---
 +
 +===== Troubleshooting & Performance =====
 +^ Issue ^ Resolution ^
 +| **Missing Dependencies** | Install base libraries: \\ <code>sudo apt install libatk1.0-0 libatk-bridge2.0-0 libcups2 libgdk-pixbuf2.0-0 libgtk-3-0 libpango-1.0-0 libcairo2 libxcomposite1 libxdamage1 libasound2t64 libatspi2.0-0</code> |
 +| **Hardware Acceleration** | For integrated or discrete GPUs, ensure your drivers (such as ''intel-media-va-driver-non-free'' for Intel setups) are properly configured via ''mesa'' to ensure local model inference acceleration. |
  
tech/linux.1781480811.txt.gz · Last modified: by glong

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki