Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Add docs for NVIDIA driver installation and customization #307

Merged
merged 1 commit into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ more.
* [Using systemd drop-in units][systemd-drop-in]
* [Using environment variables in systemd units][environment-variables-systemd]
* [Using systemd and udev rules][udev-rules]
* [Using NVIDIA GPUs on Flatcar][using-nvidia]
* [Scheduling tasks with systemd timers][tasks-with-systemd]
* [Configuring DNS][dns]
* [Configuring date & timezone][date-timezone]
Expand Down
48 changes: 48 additions & 0 deletions docs/setup/customization/using-nvidia.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
sayanchowdhury marked this conversation as resolved.
Show resolved Hide resolved
title: Using NVIDIA GPUs on Flatcar
description: How to use and customize the NVIDIA driver on Flatcar
weight: 30
---

### Installation

Flatcar Container Linux offers support for the installation and customization of NVIDIA drivers for Tesla GPU VMs on AWS and Azure.

During the initial boot, the `nvidia.service` automates hardware detection and triggers driver installation within a dedicated Flatcar developer container, ensuring a streamlined process. The current version of the installed NVIDIA driver can be found in the `/usr/share/flatcar/nvidia-metadata` file, assuming it's a vanilla installation and the version hasn't been customized (see below).

It's important to note that Flatcar Container Linux adheres strictly to NVIDIA's distribution terms, and therefore does not include pre-installed support for NVIDIA drivers. However, Flatcar simplifies the installation process by seamlessly integrating it into the first boot experience. This approach allows users to quickly and effortlessly set up the NVIDIA driver environment, aligning with NVIDIA's guidelines for driver distribution.

Since the installation is triggered after boot, the overall installation time is around 5-10 minutes. To check the installation status, use the following command:

```
# journalctl -u nvidia -f
```

Once the installation is complete, you will have access to various NVIDIA commands. To verify the installation, run the command:

```
# nvidia-smi
```

### Customization

To customize the version number of the NVIDIA driver, you can override the value in the `/etc/flatcar/nvidia-metadata` file by specifying the desired version in the `NVIDIA_DRIVER_VERSION`. However, it's important to ensure that the chosen driver version is compatible with the GPU hardware present in the instance.
E.g., for older GPUs the 460 driver series is needed because the latest drivers dropped support for them.

```
echo "NVIDIA_DRIVER_VERSION=460.106.00" | sudo tee /etc/flatcar/nvidia-metadata
sudo systemctl restart nvidia
```

Butane Config

```
variant: flatcar
version: 1.0.0
storage:
files:
- path: /etc/flatcar/nvidia-metadata
mode: 0644
contents:
inline: |
NVIDIA_DRIVER_VERSION=460.106.00