plain-carpet-73994
09/28/2022, 7:53 PM--extra-index-urls
each uses (because pytorch has CUDA and non-CUDA libs which are differentiated only by the index url). But it appears that python-repos.indexes
is a global property and can't be set per-resolve. Is there a way to do this?
(see https://pantsbuild.slack.com/archives/C046T6T9U/p1664233267501069 for some more context if necessary)bitter-ability-32190
09/28/2022, 8:02 PMplain-carpet-73994
09/28/2022, 8:08 PMindexes
but that seems brittle.happy-kitchen-89482
09/28/2022, 10:14 PMplain-carpet-73994
09/28/2022, 10:15 PMpip install
command to run. As far as I can tell the only thing that changes is the --extra-index-url
. Weird way to do things IMHO...bitter-ability-32190
09/29/2022, 11:57 PMplain-carpet-73994
09/30/2022, 12:03 AM*generate*-lockfiles
and that gets re-run all the time as we add dependencies. And that goal uses the one-true python-repos.indexes
to populate the lockfiles even if you have mutliple resolves.
I'm open to generating our own lockfiles manually somehow but unclear on how to do that. The pants lockfiles do not look like the output of pip freeze
...happy-kitchen-89482
09/30/2022, 12:06 AMplain-carpet-73994
09/30/2022, 12:10 AMdoit
(https://pydoit.org/) wrapper around Pants so it can coordinate things like building containers that contain code build from multiple different languages, etc. so we could easily add it there and "hide the ugly" from users. We probably don't even need multiple resolves then as the normal day-to-day use-case is the CPU version and then we do a single build for production with GPU enabled.
Thanks!!