Skip to content

Instantly share code, notes, and snippets.

@vitorcalvi
Last active May 26, 2024 18:03
Show Gist options
  • Save vitorcalvi/b6f12c9cd6512de5f75ebb31e8047340 to your computer and use it in GitHub Desktop.
Save vitorcalvi/b6f12c9cd6512de5f75ebb31e8047340 to your computer and use it in GitHub Desktop.
LLma + Benchmark (for Cloud servers)
#!/bin/bash
sudo apt update && sudo apt full-upgrade -y
# Install cockpit and its components, netdata, git-lfs, and npm
sudo apt install "cockpit" "cockpit-machines" "cockpit-storaged" "cockpit-packagekit" "cockpit-networkmanager" "cockpit-system" -y
sudo apt install netdata -y && sudo apt install git-lfs -y && sudo apt install npm -y
Check if Nvidia graphics hardware is present
if lspci | grep -qi 'nvidia'; then
List PCI devices related to graphics
lspci | grep -i --color 'vga\|3d\|2d'
Install ubuntu-drivers-common and recommended drivers
sudo apt install "ubuntu-drivers-common" && sudo ubuntu-drivers autoinstall
Install nvidia-driver-535 and nvidia-cuda-toolkit
sudo apt install "nvidia-driver-535" -y && sudo apt install "nvidia-cuda-toolkit" -y
else
echo "Nvidia graphics hardware not found."
fi
#Install Miniconda
cd /tmp/
curl -LO https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh; bash Miniconda3-latest-Linux-x86_64.sh
Create and activate a conda environment for llmbenchmark
conda create -n llmbenchmark python=3.10 -y && conda activate llmbenchmark
#Install Ollama AI and run the benchmark
curl https://ollama.ai/install.sh | sh
pip install llm-benchmark
# llm_benchmark run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment