Skip to content

Commit

Permalink
add nvidia docs
Browse files Browse the repository at this point in the history
  • Loading branch information
saltydk committed Aug 28, 2024
1 parent bee15b3 commit e5cc5a0
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
76 changes: 76 additions & 0 deletions docs/advanced/nvidia.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
hide:
- tags
tags:
- nvidia
---

# Enabling Nvidia Support in Saltbox

Saltbox provides support for Nvidia GPUs, allowing you to leverage hardware acceleration for various tasks. This guide will walk you through the process of enabling Nvidia support by modifying specific variables in your inventory.

## Configuration Variables

To enable Nvidia support, you need to modify the following variables in your inventory file:

```yaml
# Set to true to enable Nvidia
nvidia_enabled: false

# Fetches the latest supported driver version supported by the keylase patch when set to "latest"
# If set to "ignore" then driver installation will be ignored and only patching will run.
# Otherwise specify a valid driver like this (it being a quoted string is important):
# nvidia_driver_version: "555.58.02"
nvidia_driver_version: "latest"
```
### Enabling Nvidia Support
To enable Nvidia support, change the `nvidia_enabled` variable to `true`:

```yaml
nvidia_enabled: true
```

### Specifying Driver Version

The `nvidia_driver_version` variable allows you to control which driver version is installed:

- Set to `"latest"` to automatically fetch and install the latest supported driver version compatible with the keylase patch.
- Set to `"ignore"` to skip driver installation and only run the patching process.
- Specify a particular driver version as a quoted string, e.g., `"555.58.02"`.

## Installation and Upgrade Process

The installation and upgrade process for Nvidia support depends on which Saltbox tags you run:

### Main Tags (core, saltbox, mediabox, feederbox)

When running any of the main tags (core, saltbox, mediabox, feederbox), Saltbox will:

1. Install the Nvidia driver if it's missing.
2. Install the Nvidia Docker toolkit.

However, these tags will not upgrade or downgrade an existing driver installation.

### Nvidia Tag

To upgrade or downgrade, you need to run the `nvidia` tag specifically:

```
sb install nvidia
```

This tag will:

1. Install the specified driver version (or the latest if set to "latest").
2. Upgrade or downgrade the driver if a different version is already installed.
3. Install and configure the Nvidia Docker toolkit.

## Important Notes

- Always ensure your `nvidia_enabled` is set to `true` before running the `nvidia` tag or any of the main tags if you want Nvidia support.
- If you're upgrading or downgrading your driver, make sure to update the `nvidia_driver_version` in your inventory before running the `nvidia` tag.
- Running the main tags will not affect an existing driver installation. To change the driver version, you must use the `nvidia` tag.

By following these guidelines, you can effectively enable and manage Nvidia support in your Saltbox installation, allowing you to take advantage of GPU acceleration for compatible applications and services.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ nav:
- Themepark Styles for apps: advanced/themepark.md
- User crontab examples: advanced/user-crontab-examples.md
- Feeder Mount: advanced/feeder.md
- Nvidia: advanced/nvidia.md

- Reference:
- Guides:
Expand Down

0 comments on commit e5cc5a0

Please sign in to comment.