Install the NVIDIA Attestation Tools#

Before you can perform attestation, you need to install the NVIDIA Attestation SDK and its dependencies on your system. The SDK provides Python libraries and tools for both local and remote GPU attestation.

This guide walks you through the installation process.

Prerequisites#

Before you begin, ensure you have the following:

  • [Optional] Review the NVIDIA NGC Status Page to ensure NVIDIA Remote Attestation Service (NRAS), RIM Service, and OCSP Service are functional.

  • An NVIDIA H100 (or newer) GPU with Confidential Computing (CC) capabilities.

  • A supported NVIDIA GPU driver installed. Please review the Compatibility Matrix to determine the correct version of nvTrust and driver to install.

  • Python 3.8 or later.

  • An NVIDIA Developer account and API key for remote attestation. If you don’t have one, follow the NGC Onboarding Guide to create an API key.

Installation#

Step 1: Install the Attestation Tools#

You can install the Attestation SDK and its bundled CLI either from PyPI or from source.

From PyPI#

Install the Attestation SDK directly from PyPI using a single command. We recommend using a Python virtual environment.

Install the SDK#

pip3 install nv-attestation-sdk

From Source#

Install nv-local-gpu-verifier as a pre-requisite (Follow the instructions in Local Verifier to install the NVIDIA GPU Local Verifier).

If you choose to install the Attestation SDK from the source code, use the following commands:

cd attestation_sdk
pip3 install .

Troubleshooting Installation Issues#

If you encounter issues during installation, it may be due to a previously failed or improper installation.

  • Permission Errors: If you see permission errors, ensure you are not trying to install the package to a system-wide Python location without the necessary privileges. Using a virtual environment avoids this problem.

  • Invalid Distribution Warning: If you encounter warning and installation issues similar to the below while installing the package:

    WARNING: Ignoring invalid distribution ~v-attestation-sdk <site-package-directory>

    Please execute the following commands to clean up packages that were not installed properly and then re-try the installation:

    rm -rf $(ls -l <site-packages-directory> | grep '~' | awk '{print $9}')
    
  • Cleanup Command: To remove any improperly installed versions of the package before retrying, you can run the following command:

    pip uninstall nvidia-attestation-sdk
    

Step 2: Configure Credentials#

To use the NVIDIA Remote Attestation Service, you need to configure your API key. The tools will automatically pick up credentials from environment variables or you can set it programmatically using the SDK.

# Replace YOUR_API_KEY with the key from your NVIDIA Developer account
export NVIDIA_API_KEY="YOUR_API_KEY"

Next Steps#

  • Now that you have installed the SDK and configured your credentials, you’re ready to run end-to-end attestation. Choose an example that matches your hardware and scenario to get started: Attestation Examples