Up to CUDA 12.1, it needs to be installed with --index-url on Linux as well, but --index-url suddenly disappeared with CUDA 12.4.
I’m wondering if this is an accidental typo in the documentation or if there really is no support for the CUDA 12.4 distribution on Linux when using pip.
I’ve read elsewhere that it now (2.5.1, and probably some earlier versions too.) installs CUDA by default on Linux, from the PyPI index (so no index needed.) I can’t see metadata info, you may have to look at what it installs.
The default pip install torch wheels always shipped with CUDA runtime dependencies so just copy/paste the command and you’ll see CUDA 12.4 dependencies will be installed too.