-
Notifications
You must be signed in to change notification settings - Fork 5
Linux
Matthew Altenburg edited this page May 16, 2025
·
1 revision
This guide walks you through installing Docker on a Linux system (tested on Ubuntu) and optionally enabling NVIDIA GPU support using the NVIDIA Container Toolkit.
β οΈ Note: This is a general guide. Your system may differ slightly.
For help, check the official Docker docs, NVIDIA docs, or ask in our Discord.
sudo apt update
sudo apt install -y \
ca-certificates \
curl \
gnupg \
lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) \
signed-by=/etc/apt/keyrings/docker.gpg] \
https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y \
docker-ce \
docker-ce-cli \
containerd.io \
docker-buildx-plugin \
docker-compose-plugin
sudo usermod -aG docker $USER
newgrp docker
Test Docker:
docker run hello-world
Only needed if you have an NVIDIA GPU and want hardware acceleration.
Make sure your system has:
- A supported NVIDIA GPU
- NVIDIA drivers installed (run
nvidia-smito check)
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \
sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit.gpg
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \
sed 's#https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit.gpg] https://#' | \
sudo tee /etc/apt/sources.list.d/nvidia-docker.list > /dev/null
sudo apt update
sudo apt install -y nvidia-container-toolkit
sudo systemctl restart docker
docker run --rm --gpus all nvidia/cuda:12.0-base nvidia-smi
You should see your GPU info printed from inside the container.
If not, check:
- Drivers are installed (
nvidia-smiworks on host) - You installed
nvidia-container-toolkit - Docker was restarted
Now that Docker is ready, continue here:
π Launching the JoeyLLM Development Container