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

【开源自荐】LightMirrors: 轻量级缓存镜像站服务,自带下载进度显示,支持DockerHub、PyPI、PyTorch、NPM等。 #4059

Closed
NoCLin opened this issue Feb 25, 2024 · 2 comments
Labels

Comments

@NoCLin
Copy link

NoCLin commented Feb 25, 2024

LightMirrors是一个开源的缓存镜像站服务,用于在内网加速软件包下载和镜像拉取,基于Aria2实现了下载进度显示。

目前支持DockerHub、PyPI、PyTorch、NPM等镜像缓存服务。

Github: https://github.com/NoCLin/LightMirrors

可用于 需要缓存大的package(如python 的 torch 和 dockerhub的nvidia/cuda)等的场景:

  • 国内高校的深度学习方向实验室
  • AI HomeLab
  • ...

部署方法

一键部署:

docker-compose up

支持的站点

DockerHub

docker pull 的时候添加前缀 docker.local.homeinfra.org 即可。
如:docker pull docker.local.homeinfra.org/busybox

PyPI

  • https: pip install jinja2 --index-url https://pypi.local.homeinfra.org/simple/
  • http: pip install jinja2 --index-url http://pypi.local.homeinfra.org/simple/ --trusted-host pypi.local.homeinfra.org

PyTorch

  • https: pip install torch --index-url https://torch.local.homeinfra.org/whl/
  • http: pip install torch --index-url http://torch.local.homeinfra.org/whl/ --trusted-host torch.local.homeinfra.org

download.pytorch.org替换为 torch.local.homeinfra.org
如果使用的是http,还需添加 --trusted-host torch.local.homeinfra.org

可以根据不同的硬件类型,切换不同的索引,如 https://download.pytorch.org/whl/cpu ,其中 cpu
可以替换为cu116/cu118/cu121/rocm5.4.2 等等。
具体请参考:https://pytorch.org/get-started/previous-versions/

NPM

npm 命令后加上 --registry https://npm.local.homeinfra.org 即可。

  • https: npm install -S express --registry https://npm.local.homeinfra.org
  • http: npm install -S express --registry http://npm.local.homeinfra.org
@ruanyf ruanyf added the weekly label Feb 28, 2024
@PhzCode
Copy link

PhzCode commented Feb 28, 2024

好用!

@NoCLin
Copy link
Author

NoCLin commented Mar 1, 2024

谢谢推荐!

@NoCLin NoCLin closed this as completed Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants