Skip to content

Instantly share code, notes, and snippets.

@bschneidr
Created November 21, 2025 03:12
Show Gist options
  • Select an option

  • Save bschneidr/4e9d14ebf9383bd7922136de08bf70ab to your computer and use it in GitHub Desktop.

Select an option

Save bschneidr/4e9d14ebf9383bd7922136de08bf70ab to your computer and use it in GitHub Desktop.
Basic uv setup for torch with CUDA 12.8
[project]
name = "huggingface"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"torch>=2.7.0",
"torchvision>=0.22.0",
]
[[tool.uv.index]]
name = "pytorch-cu128"
url = "https://download.pytorch.org/whl/cu128"
explicit = true
[tool.uv.sources]
torch = [
{ index = "pytorch-cu128", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
]
torchvision = [
{ index = "pytorch-cu128", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment