Skip to content

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

Closed
@NoCLin

Description

@NoCLin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions