-
Notifications
You must be signed in to change notification settings - Fork 0
UV commands
Shamik edited this page Mar 19, 2026
·
1 revision
Add the following to the pyproject.toml for PyTorch gpu
[[tool.uv.index]]
name = "pytorch"
url = "https://download.pytorch.org/whl/cu118" or "https://download.pytorch.org/whl/cpu"
explicit = trueuv add torch --index https://download.pytorch.org/whl/cpuuv add pandas --group <name>uv init hello_world -p 3.12uv sync/run --frozen uv lockuv lock -Uuv sync --lockedNavigate to inside the project directory
uv python pin <python version>https://docs.astral.sh/uv/concepts/python-versions/#adjusting-python-version-preferences