-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Labels
enhancementNew feature or improvement to existing functionalityNew feature or improvement to existing functionalityneeds-designNeeds discussion, investigation, or designNeeds discussion, investigation, or design
Description
I am exporting uv.lock to requirements.txt for bazel.
I have torch index overrides which aren't exported and produce impossible to insall requirements file:
[tool.uv.sources]
torch = [
{ index = "pytorch-cpu" },
]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = trueresults in:
torch==2.5.1+cpu \
--hash=sha256:4856f9d6925121d13c2df07aa7580b767f449dfe71ae5acde9c27535d5da4840 \
--hash=sha256:a6b720410350765d3d77c01a5ce098a6c45af446284e45e87a98b8a16e7d564d
Looks like lock file contains index info so this should be possible:
[[package]]
name = "torch"
version = "2.5.1+cpu"
source = { registry = "https://download.pytorch.org/whl/cpu" }This probably isn't as simple as writing all indexes to requirements file because ordering matters. Maybe there could be a way to manually give it indexes instead?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or improvement to existing functionalityNew feature or improvement to existing functionalityneeds-designNeeds discussion, investigation, or designNeeds discussion, investigation, or design