AphrodyBun GitHub

Runtime docs · Runtime · Process & System

PyTorch CUDA

Install PyTorch with the CUDA build matching the NVIDIA driver in a uv virtual environment and check it from bun python

scripts/aphrody/cuda-torch.ts creates a virtual environment with the embedded UV (uv, aliased to Bun), installs torch from the PyTorch index that matches the CUDA version reported by nvidia-smi, then runs torch.cuda.is_available() through bun python.

bun scripts/aphrody/cuda-torch.ts                 # detects the driver, installs into ~/.aphrody/venvs/torch-cuda
bun scripts/aphrody/cuda-torch.ts --cuda cu128    # force an index
bun scripts/aphrody/cuda-torch.ts --dry-run       # print the commands only
Driver CUDAIndex
13.0 and upcu130
12.8, 12.9cu128
oldercu126
OptionDefault
--dir <path>$APHRODY_HOME/venvs/torch-cuda
--python <ver>3.12
--cuda <cuXXX>detected from the driver
--cpuCPU wheels, for servers without GPU

The script exits with status 3 when a CUDA index was requested and CUDA is not available after the install. Servers use --cpu only.