How to Set Up NVIDIA Container Runtime and Deploy GPUStack with Docker

How to Set Up NVIDIA Container Runtime and Deploy GPUStack with Docker

GPUStack is an open-source GPU cluster manager designed for running large models, including LLMs, embedding models, reranker models, vision language models, image generation models, as well as STT and TTS models. It allows you to create a unified cluster by combining GPUs from diverse platforms, such as Apple Macs, Windows PCs, and Linux servers.

Using Docker to install GPUStack on Linux is the recommended method. It simplifies the installation process by avoiding many dependency and compatibility issues.

Today, we bring you a tutorial on how to to set up the NVIDIA container runtime and deploy GPUStack with Docker.

 

Requirements

Verify you have NVIDIA GPU:

Verify the system has gcc Installed:

 

Installing NVIDIA driver

Refer to: https://developer.nvidia.com/datacenter-driver-downloads

Install the kernel headers and development packages for the currently running kernel:

Install the cuda-keyring package:

Install NVIDIA driver:

Reboot the system:

Log in again and check the nvidia-smi command is available:

image-20241118175603256

 

Installing Docker Engine

Refer to: https://docs.docker.com/engine/install/ubuntu/

Run the following command to uninstall all conflicting packages:

Set up Docker's apt repository:

Install the Docker packages:

Check the Docker is available:

 

Installing NVIDIA Container Toolkit

Refer to: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html

Configure the production repository:

Install the NVIDIA Container Toolkit packages:

Configure the container runtime by using the nvidia-ctk command:

Check the daemon.json file:

Restart the Docker daemon:

Verify your installation by running a sample CUDA container:

image-20241118182113520

 

Installing GPUStack

Refer to: https://docs.gpustack.ai/latest/installation/docker-installation/

Install GPUStack with Docker:

To view the login password, run the following command:

Access the GPUStack UI ( http://YOUR_HOST_IP ) in your browser, using admin as the username and the password obtained above. After resetting your password, log into GPUStack.

image-20241118184913586

To add additional worker nodes and form a GPUStack cluster, please run the following command on each worker node:

Replace http://YOUR_HOST_IP with your GPUStack server URL and YOUR_TOKEN with your secret token for adding workers. To retrieve the token from the GPUStack server, use the following command:

After that, deploy models from the Hugging Face:

image-20241118215525917

Experimenting with the model in Playground:

image-20241118215644218

 

Join Our Community

In this tutorial, we introduced how to set up the NVIDIA container runtime and deploy GPUStack with Docker.

If you are interested in GPUStack, please find more information at: https://gpustack.ai.

If you encounter any issues or have suggestions for GPUStack, feel free to join our Community for support from the GPUStack team and to connect with fellow users globally.

 

Related Articles