Hi. I need to set specific indexes for my requirem...
# general
f
Hi. I need to set specific indexes for my requirements, however the index-url and -f seems to be ignored within the requirements file. I've therefore set the find_links, however that's no applying to all my resolves. Is there a way to apply that to only a particular resolve? Adding to the requirements.txt for that resolve seems to have no effect. this is for python btw.
c
@happy-kitchen-89482 do you know the answer to this?
b
Just to confirm: Are you finding that setting
[python-repos].find_links
https://www.pantsbuild.org/docs/reference-python-repos for all resolves is causing issues?
f
yes, i can't use that. My use case is I'm trying to install torch and need to have the torch cpu and torch gpu versions as different resolves so i can have a hardware dependent install. My approach has been to separate teh resolves for each and therefore i need to use different torch for each. Torch doesn't distinguish between them with version, in order to get teh right one you need to set the index. When i try to set the index-url or the find_links in the requirements.txt, it seems pants ignores this. When i set the [python-repos].find_links i am setting it for the entire project, which means the entire project is either cpu or gpu, and i need to be flexible for either.
b
ah, okay. I'm not sure about per-resolve
find_links
. It looks like that might be covered by the https://github.com/pantsbuild/pants/issues/17565 feature request. For pytorch specifically, have you seen the discussion on https://github.com/pantsbuild/pants/issues/18293 and https://github.com/pantsbuild/pants/issues/18965, and particularly the script in https://pantsbuild.slack.com/archives/C046T6T9U/p1684784852307449?thread_ts=1684770424.580559&channel=C046T6T9U&message_ts=1684784852.307449 ?
f
I think it wouldn't need to be per-revoles find-links if the existing options in the requirements file were processed. So that way you might be able to support all the options within the requirements file?
Thanks for sendin those links though, that's interesting. Also good to know we're not the only ones doing this.