salmon-furniture-31733
10/27/2023, 9:18 AMpip install torch --index-url <https://download.pytorch.org/whl/cu118>bulky-afternoon-92433
10/27/2023, 9:23 AMbulky-afternoon-92433
10/27/2023, 9:25 AMpip config set global.index-url some-index-url
pip config set global.extra-index-url "index-A index-B index-C"
note that you can set multiple urls in the extra-index-url valuebulky-afternoon-92433
10/27/2023, 9:26 AMbulky-afternoon-92433
10/27/2023, 9:48 AMsalmon-furniture-31733
10/27/2023, 10:37 AMsalmon-furniture-31733
10/27/2023, 10:38 AMglobal.index-url "my-private-package-url"
extra-index-url "<https://download.pytorch.org/whl/cu118> <http://pypi.org/simple>"
my decorator would look like -
@pypi(python='3.11.5',packages={'private-pkg':'1.0', 'torch': '2.1.0', 'numpy': '1.26.1'})
in this case, when I install pytorch, i want it to take the cu118 index, and not the default pypibulky-afternoon-92433
10/27/2023, 1:07 PMsalmon-furniture-31733
10/27/2023, 1:30 PMbulky-afternoon-92433
10/27/2023, 2:21 PMsalmon-furniture-31733
10/30/2023, 10:58 AMpytorch==2.1.0+cu118, this resolves the index correctly, so I'm not blocked right now.
Facing another issue with pypi though
I'm trying to install a package - pytorchvideo (https://pypi.org/project/pytorchvideo/0.1.5/#files)
from metaflow import FlowSpec, pypi, step
class FractalFlow(FlowSpec):
@step
def start(self):
self.next(self.plot)
@pypi(python='3.9.13',
packages={'pytorchvideo': '0.1.5'})
@step
def plot(self):
# pylint: disable=import-error,no-member
import pytorchvideo
self.next(self.end)
@step
def end(self):
pass
if __name__ == '__main__':
FractalFlow()
This flow fails, even though lcally pip install pytorchvideo==0.1.5 works for me
Tried it on mac and linux both
Metaflow 2.10.4 executing FractalFlow for user:macuser
Validating your flow...
The graph looks good!
Running pylint...
Pylint not found, so extra checks are disabled.
Bootstrapping virtual environment(s) ...
Pip ran into an error while setting up environment:
command '/Users/macuser/.metaflowconfig/micromamba/bin/micromamba run --prefix /Users/macuser/micromamba/envs/metaflow/osx-arm64/7590fe4ac935166 pip3 --disable-pip-version-check --no-input --no-color --isolated install --dry-run --only-binary=:all: --upgrade-strategy=only-if-needed --target=/var/folders/z2/1gcnb7c55sg2c7hw53p5j3qh0000gn/T/tmpjy50s7hy --report=/var/folders/z2/1gcnb7c55sg2c7hw53p5j3qh0000gn/T/tmpjy50s7hy/report.json --progress-bar=off --quiet --abi cp39 --abi abi3 --abi none --platform any --platform macosx_13_0_universal2 --platform macosx_10_9_universal2 --platform macosx_12_0_arm64 --platform macosx_10_8_universal2 --platform macosx_10_5_universal2 --platform macosx_10_12_universal2 --platform macosx_10_16_universal2 --platform macosx_13_0_arm64 --platform macosx_10_6_universal2 --platform macosx_10_15_universal2 --platform macosx_10_7_universal2 --platform macosx_10_10_universal2 --platform macosx_10_11_universal2 --platform macosx_12_0_universal2 --platform macosx_11_0_universal2 --platform macosx_10_14_universal2 --platform macosx_11_0_arm64 --platform macosx_10_4_universal2 --platform macosx_10_13_universal2 requests>=2.21.0 boto3>=1.14.0 pytorchvideo==0.1.5' returned error (1)
ERROR: Could not find a version that satisfies the requirement pytorchvideo==0.1.5 (from versions: none)
ERROR: No matching distribution found for pytorchvideo==0.1.5
The package doesn't have any whl file available (https://pypi.org/project/pytorchvideo/0.1.5/#files)
Is it because of this?bulky-afternoon-92433
10/30/2023, 11:08 AM--only-binary=:all: option that we pass to the pip install and there only being a source package available for pytorchvideo. The requirement for this was for cross-platform package resolving (f.ex. deploying from an M2 mac to a linux-x86 kubernetes cluster, how to cache required packages). Arguably source packages that do not require platform specific build steps should work in either case, but there are no checks in place for this at the moment.salmon-furniture-31733
10/30/2023, 11:11 AMbulky-afternoon-92433
10/30/2023, 11:14 AMbulky-afternoon-92433
10/30/2023, 11:16 AMsalmon-furniture-31733
10/30/2023, 11:19 AMbulky-afternoon-92433
10/30/2023, 11:24 AMdry-beach-38304
10/30/2023, 3:44 PMsalmon-furniture-31733
10/31/2023, 9:35 AMdry-beach-38304
10/31/2023, 4:54 PM