Cannot setup the runtime env

Ah thanks for finding this! It’s too bad that pip doesn’t show an error message in this case (it seems to hang at Collecting torch==1.10.2 according to the traceback posted earlier.)

I am not sure how to add this line to requirements.txt or runtime_env

python - How to format requirements.txt when package source is from specific websites? - Stack Overflow has a detailed answer; you can just include it as a line in requirements.txt.

Note that we unfortunately had a regression for including such options in requirements.txt in Ray 1.10 ([Bug] Python: --extra-index-url does not work in requirements file anymore · Issue #22056 · ray-project/ray · GitHub), so you would need to use Ray 1.9 or earlier or use Ray 1.11.0rc0 (pip install ray[default]==1.11.0rc0) for this to work, or use a nightly build that contains the bugfix. Alternatively, you can set the -f --find-links flag using an environment variable: Configuration - pip documentation v23.3.1. But note that this environment variable should be set on the cluster before Ray is started (e.g. with ray start), otherwise the runtime env pip process won’t see it.

1 Like