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, with automatic GPU detection and optional GPU-enabled module installation.

Usage

check_nvidia_gpu()

Details

This function performs the following steps:

  • Checks for NVIDIA GPU availability

  • If GPU is detected, prompts user to choose between CPU or GPU installation

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

  • For GPU installations, sets up additional GPU-specific modules via setup_gpu_modules()

The function automatically manages dependencies and versions, ensuring compatibility between CPU and GPU variants of packages like torch, tensorflow, and torchvision. It uses conda_install for package management in the 'transforEmotion' conda environment.

Note

Ensure that miniconda is installed and properly configured before running this function. For GPU support, NVIDIA drivers must be properly installed on your system.

Author(s)

Alexander P. Christensen <alexpaulchristensen@gmail.com>


transforEmotion documentation built on June 8, 2025, 10:25 a.m.