Docker containers on Thunder Compute instances now come with GPU support enabled by default. This means you can run Docker containers with GPU access without any additional configuration. For more information about GPU compatibility, see our compatibility guide.

Getting Started

  1. Connect to a Thunder Compute instance using the quickstart guide

  2. Run your Docker containers as normal - GPU support is automatically enabled:

# Run a container with GPU support
docker run ubuntu:22.04 nvidia-smi
# Run Ollama server (see our [Deepseek guide](/guides/deepseek-r1-running-locally-on-thunder-compute) for an example use case)
docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama

If you get an error that looks like docker: unexpected EOF, try running the command again. For more troubleshooting tips, see our troubleshooting guide.

Supported Base Images

Most modern Docker images are supported, with some limitations:

  • Ubuntu 22.04 and newer base images are fully supported
  • Ubuntu 20.04 base images are supported in beta
  • Other distributions like Alpine and Debian are supported

Disabling GPU Support

If you need to run containers without GPU access, or encounter issues with the thunder runtime:

  1. Edit the Docker daemon configuration:
sudo vi /etc/docker/daemon.json
  1. Remove “thunder” as the default runtime

  2. Restart the Docker service:

sudo systemctl daemon-reload
sudo systemctl restart docker

You can manually set the runtime for a container by adding the --runtime=thunder flag to the docker run command.

Example Dockerfile

FROM ubuntu:22.04

# Install dependencies
RUN apt-get update && apt-get install -y python3-pip

# Install your packages
RUN pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu126

ENTRYPOINT ["python3", "-c", "import torch; print(torch.cuda.is_available())"]

For more advanced development environments, you might want to check out our guides on using VSCode or running Jupyter notebooks.

Need Help?

If you encounter any issues or have questions about Docker support, please contact our support team.