Skip to contents

Reinstalls the Python environment with GPU-enabled PyTorch for faster inference with local embedding models. Requires a CUDA-compatible NVIDIA GPU and proper driver installation.

Usage

install_gpu_support()

Value

Invisible TRUE on success.

Details

This function:

  1. Removes the existing Python environment

  2. Creates a new environment with GPU-enabled PyTorch

  3. Installs all HuggingFace dependencies

On Apple Silicon Macs, MPS (Metal Performance Shaders) acceleration is used automatically without needing this function.

Examples

if (FALSE) { # \dontrun{
# Enable GPU acceleration (requires NVIDIA GPU + CUDA)
install_gpu_support()
} # }