check_nvidia_gpu: Install Necessary Python Modules

View source: R/setup_modules.R

check_nvidia_gpuR Documentation

Install Necessary Python Modules

Description

Installs required Python modules for the {transforEmotion} package, using uv for fast, reproducible environments. Optionally detects GPU and can add GPU-oriented packages.

Usage

check_nvidia_gpu()

Details

This function performs the following steps:

  • Detects NVIDIA GPU availability automatically

  • Installs core modules including transformers, torch, tensorflow, and other dependencies

  • For GPU systems, adds GPU-specific packages (and optional extras via setup_gpu_modules())

The function declares Python requirements via py_require, which uses uv to resolve and cache an ephemeral environment on first use. No conda/Miniconda is required.

Note

For GPU support, NVIDIA drivers must be properly installed on your system. If you need vendor-specific wheels (e.g., for CUDA), configure package indexes prior to calling this function (see Notes in documentation).

Author(s)

Alexander P. Christensen <alexpaulchristensen@gmail.com>


transforEmotion documentation built on Jan. 8, 2026, 5:06 p.m.