---
description: Learn how to set up LLM Studio.
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
# Set up H2O LLM Studio
## Prerequisites
H2O LLM Studio requires the following minimum requirements:
- A machine with Ubuntu 16.04+ with atleast one recent Nvidia GPU
- Have at least 128GB+ of system RAM. Larger models and complex tasks may require 256GB+ or more.
- Nvidia drivers v470.57.02 or a later version
- Access to the following URLs:
- developer.download.nvidia.com
- pypi.org
- huggingface.co
- download.pytorch.org
- cdn-lfs.huggingface.co
:::info Notes
- Atleast 24GB of GPU memory is recommended for larger models.
- For more information on performance benchmarks based on the hardware setup, see [H2O LLM Studio performance](llm-studio-performance.md).
- The required URLs are accessible by default when you start a GCP instance, however, if you have network rules or custom firewalls in place, it is recommended to confirm that the URLs are accessible before running `make setup`.
:::
## Installation
:::note Installation methods
The recommended way to install H2O LLM Studio is using pipenv with Python
3.10. To install Python 3.10 on Ubuntu 16.04+, execute the following
commands.
System installs (Python 3.10)
Install NVIDIA drivers (if required)
Create virtual environment (pipenv)
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.10
sudo apt-get install python3.10-distutils
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
If you are deploying on a 'bare metal' machine running Ubuntu, you may need
to install the required Nvidia drivers and CUDA. The following commands show
how to retrieve the latest drivers for a machine running Ubuntu 20.04 as an
example. You can update the following based on your respective operating system.
wget
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin{" "}
sudo mv cuda-ubuntu2004.pin
/etc/apt/preferences.d/cuda-repository-pin-600
wget
https://developer.download.nvidia.com/compute/cuda/11.4.3/local_installers/cuda-repo-ubuntu2004-11-4-local_11.4.3-470.82.01-1_amd64.deb{" "}
sudo dpkg -i
cuda-repo-ubuntu2004-11-4-local_11.4.3-470.82.01-1_amd64.deb
sudo apt-key add /var/cuda-repo-ubuntu2004-11-4-local/7fa2af80.pub
sudo apt-get -y update
sudo apt-get -y install cuda
The following command creates a virtual environment using pipenv and will install
the dependencies using pipenv.
make setup
If you wish to use conda or another virtual environment, you can also
install the dependencies using the requirements.txt
{" "}
file.{" "}
pip install -r requirements.txt
Follow the steps below to install H2O LLM Studio on a Windows machine using Windows Subsystem for Linux{" "} WSL2
1. Download the{" "} latest nvidia driver {" "} for Windows.{" "}
2. Open PowerShell or a Windows Command Prompt window in administrator mode.{" "}
3. Run the following command to confirm that the driver is installed properly and see the driver version.
nvidia-smi
4. Run the following command to install WSL2.
wsl --install
5. Launch the WSL2 Ubuntu installation.
6. Install the{" "} WSL2 Nvidia Cuda Drivers .
wget
https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin{" "}
sudo mv cuda-ubuntu2004.pin
/etc/apt/preferences.d/cuda-repository-pin-600
wget
https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda-repo-wsl-ubuntu-12-2-local_12.2.0-1_amd64.deb{" "}
sudo dpkg -i cuda-repo-wsl-ubuntu-12-2-local_12.2.0-1_amd64.deb
sudo cp /var/cuda-repo-wsl-ubuntu-12-2-local/cuda-*-keyring.gpg
/usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cuda
7. Set up the required python system installs (Python 3.10).
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.10
sudo apt-get install python3.10-distutils
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
8. Create the virtual environment.
sudo apt install -y python3.10-venv
python3 -m venv llmstudio
source llmstudio/bin/activate
9.Clone the H2O LLM Studio repository locally.
git clone https://github.com/h2oai/h2o-llmstudio.git
cd h2o-llmstudio
10. Install H2O LLM Studio using the `requirements.txt`.
pip install -r requirements.txt
11. Run the H2O LLM Studio application.
H2O_WAVE_MAX_REQUEST_SIZE=25MB \
H2O_WAVE_NO_LOG=True \
H2O_WAVE_PRIVATE_DIR="/download/@output/download" \
wave run app
This will start the H2O Wave server and the H2O LLM Studio app. Navigate to http://localhost:10101/ (we recommend using Chrome) to access H2O LLM Studio and start fine-tuning your models.