Hacker News new | ask | show | jobs
by ttyprintk 581 days ago
Apparently, uv respects a key in project.toml:

    [[tool.uv.index]]
    name = "pytorch-cu124"
    url = "https://download.pytorch.org/whl/cu124"
    explicit = true
1 comments

Nice, I wonder if there is a way to make it conditional, e.g. to pick a different key for a cpu vs cuda build.
That’s basically what TFA is about? Set up multiple index urls, and use a bog-standard platform marker on the PyTorch dep to pick between them.
Eh, in that case the environment variable is a bit more evident in a Dockerfile.