GPU & CUDA

To use Liberate.FHE, a GPU is required. This document explains how to set up and install the Nvidia graphics card driver and CUDA. It provides steps to identify and install the GPU, update package lists, install Nvidia drivers, verify the installation, install the CUDA toolkit, set environment variables, and verify the CUDA installation.

Setting graphic card

GPU

Step 1: Identify your GPU

Before you begin, it's essential to identify the Nvidia GPU model in your system. You can use the following commands to check:

lshw -numeric -C display
lspci | grep -i nvidia

If the Nvidia graphics card is not installed or an incompatible version of CUDA is installed, install a new version.

Step 2: Update package lists

Ensure that your package lists are up to date.

sudo apt update

Check available graphic cards.

ubuntu-drivers devices

Step 3: Install nvidia driver

Automatically install the recommended drivers.

sudo ubuntu-drivers autoinstall

Alternatively, manually install the desired version.

sudo apt install nvidia-driver-535-server

Don't forget to restart the server after installing the graphic card driver.

Step 4: Verify installation

Please ensure that the graphics card is in working order.

nvidia-smi

If you encounter any issues during the installation or need further customization, you can refer to the official Nvidia documentation or seek help from the Ubuntu community forums.


CUDA

Step 1: Verify your GPU

Make sure your GPU is CUDA-compatible. You can find a list of CUDA-enabled GPUs on the Nvidia website.

Step 2: Install the nvidia GPU drivers

Please refer to the instructions provided above.

Step 3: Download CUDA toolkit

Visit the Nvidia CUDA Toolkit download page.

Step 4: Install the CUDA toolkit

Assuming you've downloaded the toolkit:

# ex)cuda 12.1.0
wget https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda_12.1.0_530.30.02_linux.run
sudo sh cuda_12.1.0_530.30.02_linux.run

Step 5: Set environment variables

Add CUDA to your PATH and update LD_LIBRARY_PATH. You can do this by adding the following lines to your ~/.bashrc or ~/.zshrc file:

export PATH=/usr/local/cuda-12.1/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-12.1/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

Remember to provide the source for your updated profile:

source ~/.bashrc

Step 6: Verify installation

Please verify if CUDA has been installed correctly by executing the following command:

nvcc --version

This should display the CUDA compiler version.


COPYRIGHT Ⓒ 2023. DESILO INC. ALL RIGHTS RESERVED.