Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pytorch-wheels镜像没有生效 #288

Closed
yuyuyzl opened this issue Aug 9, 2022 · 3 comments
Closed

pytorch-wheels镜像没有生效 #288

yuyuyzl opened this issue Aug 9, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@yuyuyzl
Copy link

yuyuyzl commented Aug 9, 2022

尝试使用pip install torch --extra-index-url https://mirror.sjtu.edu.cn/pytorch-wheels/cu113 安装torch
但是最后还是走到了https://download.pytorch.org/whl/cu113/torch-1.12.1%2Bcu113-cp310-cp310-win_amd64.whl
image

这个文件确实是存在于https://mirror.sjtu.edu.cn/pytorch-wheels/cu113/torch-1.12.1%2Bcu113-cp310-cp310-win_amd64.whl 的,是我的使用方法有问题吗?如果确实是使用方法不对还请赐教
由于要写泛用的安装脚本,torch又比较大,直连的话速度非常不稳定,贵站的镜像会很有帮助,感谢

@yuyuyzl yuyuyzl added the bug Something isn't working label Aug 9, 2022
@yzx9
Copy link

yzx9 commented Mar 18, 2023

Is there any update?

WORKAROUND

You can manually specify the version and add the -f option to access mirror.

pip3 install \
  torch==2.0.0+cu118 \
  torchvision==0.15.1+cu118 \
  torchaudio==2.0.1+cu118 \
  -f https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html

And you may need to find the version by visiting https://mirror.sjtu.edu.cn/pytorch-wheels/?mirror_intel_list

@PhotonQuantum
Copy link
Member

请遵循我们帮助文档的说明进行安装
https://mirror.sjtu.edu.cn/docs/pytorch-wheels
如果还有问题欢迎重新打开 issue

@jerryjiahaha
Copy link

https://mirror.sjtu.edu.cn/docs/pytorch-wheels 给的说明(首先捉个虫,写'=='就行了,文档里写成了'===')是

pip install torch===1.7.1 torchvision===0.8.2 torchaudio===0.7.2 -f https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html

用高版本pip (ubuntu22.04下的包管理版本) 执行会有警告信息:

DEPRECATION: The HTML index page being used (https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html) is not a proper HTML 5 document. This is in violation of PEP 503 which requires these pages to be well-formed HTML 5 documents. Please reach out to the owners of this index page, and ask them to update this index page to a valid HTML 5 document. pip 22.2 will enforce this behaviour change. Discussion can be found at pypa/pip#10825

此外,如果这些模块想要指定cuda版本(如cuda11.8),就得写成 torch==2.1.0+cu118,每个模块都需要跟一个+cu118,不如直接区分index-url优雅,例如torch 2.1的安装说明 https://pytorch.org/get-started/previous-versions/#v210里面,安装不同版本是通过指定不同index-url实现的:

pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu118

这个有无可能也做类似支持?目前 https://mirror.sjtu.edu.cn/pytorch-wheels/cu118 会直接重定向到torch官网。


此外, https://mirror.sjtu.edu.cn/pytorch-wheels/cu118/?mirror_intel_list 这个是自动更新的吗? torchvision的版本似乎没有0.16.0的。如果这个网址能保持最新,也可以避免每个torch模块都要单独指定cuda版本。


缕一下问题是以下几点:

  1. 文档可以考虑更新
  2. 能否支持torch最新文档的安装指令(仅替换URL)
  3. https://mirror.sjtu.edu.cn/pytorch-wheels/cu118/?mirror_intel_list 里理论上应该有torchvision 0.16.0 但是看起来这个索引没有更新,或者是我打开方式不对需要帮助。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants