plain-carpet-73994
09/26/2022, 11:01 PM--extra-index-url
. For example, to run on a CPU you'd do pip3 install torch --extra-index-url <https://download.pytorch.org/whl/cpu>
but for a GPU you'd do pip3 install torch --extra-index-url <https://download.pytorch.org/whl/cu116>
.
I know how to add an extra index URL to [python-repos]
in pants.toml
but I have no idea how to do that conditionally. Any ideas?bitter-ability-32190
09/26/2022, 11:53 PM--python-repos-foo-bar
bitter-ability-32190
09/26/2022, 11:54 PMbitter-ability-32190
09/26/2022, 11:59 PMplain-carpet-73994
09/27/2022, 4:54 PMplain-carpet-73994
09/27/2022, 4:54 PMplain-carpet-73994
09/27/2022, 4:55 PMpants.toml
, symlinks out the 3rdParty
directory so the lock files change, etc.bitter-ability-32190
09/27/2022, 4:55 PMmxnet
changes the package name, but has the same module name. That makes things so much easierbitter-ability-32190
09/27/2022, 4:56 PMplain-carpet-73994
09/27/2022, 4:58 PMplain-carpet-73994
09/27/2022, 4:58 PMbitter-ability-32190
09/27/2022, 5:01 PMresolve=parameterize("resolveA", "resolveB")
which then makes your library have 2 targets, one for each resolve. Spread that over your whole codebase and lastly declare your final application with only the resolve you want and presto!bitter-ability-32190
09/27/2022, 5:01 PMplain-carpet-73994
09/27/2022, 5:04 PMbitter-ability-32190
09/27/2022, 5:04 PMplain-carpet-73994
09/27/2022, 9:16 PMbitter-ability-32190
09/27/2022, 9:27 PMplain-carpet-73994
09/27/2022, 9:27 PMplain-carpet-73994
09/27/2022, 9:27 PMbitter-ability-32190
09/27/2022, 9:27 PMbitter-ability-32190
10/24/2022, 8:07 PMbitter-ability-32190
10/24/2022, 8:07 PMplain-carpet-73994
11/07/2022, 9:28 PMbitter-ability-32190
11/07/2022, 9:32 PMplain-carpet-73994
11/07/2022, 9:53 PMboundless-ambulance-11161
04/19/2023, 2:49 AMbitter-ability-32190
04/19/2023, 10:54 AMbitter-ability-32190
04/19/2023, 10:58 AMbitter-ability-32190
04/19/2023, 1:29 PM