Skip to content

Latest commit

 

History

History
38 lines (21 loc) · 1.44 KB

README.md

File metadata and controls

38 lines (21 loc) · 1.44 KB

K3d GPU Support

This is a simple repository for preparing a k3s + nvidia/cuda base image that enables a K3d cluster to have access to your host machine's NVIDIA, CUDA-capable GPU(s).

Pre-Requisites

Access to GitHub and GitHub Container Registry. Please follow the GitHub Container Registry instructions.

Docker and all of its dependencies must be installed.

For the container GPU test, a NVIDIA GPU with CUDA cores and drivers must be present. Additionally, the CUDA toolkit and NVIDIA container toolkit must be installed.

For Kubernetes testing and pre-requisites, please see Kubernetes Deployment for details.

Usage

Building and Pushing the Image

Check out the Make targets for the various options.

Kubernetes Deployment

Follow the instructions in the zarf-package-k3d-airgap repository for bootstrapping a K3d cluster that can access your NVIDIA GPUs.

You can also a use more abstracted version of the above Kubernetes deployment by following the instructions in the uds-leapfrogai bundle repository.

Test

Run:

kubectl apply -f test/cuda-vector-add.yaml
kubectl logs cuda-vector-add

References