Skip to content

Instantly share code, notes, and snippets.

@djibe
Last active June 9, 2026 17:17
Show Gist options
  • Select an option

  • Save djibe/7040ddae4f153b61e61e51dda1eb7321 to your computer and use it in GitHub Desktop.

Select an option

Save djibe/7040ddae4f153b61e61e51dda1eb7321 to your computer and use it in GitHub Desktop.
PyTorch 2026 setup on Windows
[project]
name = "xxx"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"accelerate>=1.12.0",
"pandas>=3.0.0",
"torch>=2.10.0",
"torchvision>=0.25.0",
"tqdm>=4.67.3",
"transformers>=5.0.0",
]
[tool.uv]
required-environments = [
"sys_platform == 'win32' and platform_machine == 'AMD64'"
]
[[tool.uv.index]]
name = "pytorch-cu132"
url = "https://download.pytorch.org/whl/cu132"
explicit = true
[tool.uv.sources]
torch = [ { index = "pytorch-cu132" } ]
torchvision = [ { index = "pytorch-cu132" } ]
@djibe

djibe commented Jun 9, 2026

Copy link
Copy Markdown
Author

Test: uv run python -c "import torch; print('GPU Available:', torch.cuda.is_available())"

@djibe

djibe commented Jun 9, 2026

Copy link
Copy Markdown
Author

uv sync

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment