欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 汽车 > 维修 > DVC+Minio

DVC+Minio

2024/10/23 23:22:58 来源:https://blog.csdn.net/fanre/article/details/140463340  浏览:    关键词:DVC+Minio

由于参数文件比较大,因此onnx、engine等大文件弃用LFS管理,改用dvc管理:

  1. minio就是存储用的

    • 启动minio
      sudo netstat -ntpl#查看端口号
      sudo kill -9 $(sudo lsof -i:5061 -t) 关闭端口对应进程
      ./minio server --console-address ":6570" --address ":6571" /home/lxxx/dataset/minio #启动
      
    • 登录
      http://127.0.0.1:6570/login
      默认账户名RootUser: minioadmin RootPass: minioadmin
      
    • 创建创建buket
  2. DVC

    • 安装

      pip install  dvc
      pip install  dvc_s3
      
    • 初始化

      dvc init #会创建一个.dvc的文件
      
    • 创建一个git提交

      git commit -m "Initialize DVC"
      
    • dvc追踪

      dvc add onnx
      git add .gitignore #.gitignore 中直接设置 onnx
      dvc config core.autostage true #大意就是直接存储# 有提示则还需要删除一些git的追踪
      git rm -r --cached 'onnx\xxx.onnx'
      git commit -m "stop tracking onnx\xxx.onnx"
      
    • 追加dvc远端信息;实际上就是.dvc/config中

      dvc remote add -d minio s3://model/onnx -f
      dvc remote modify minio endpointurl http://xxxx:6571
      dvc remote modify minio access_key_id xxxx
      dvc remote modify minio secret_access_key xxxx
      dvc push
      
    • dvc拉取

      dvc pull
      
    • dvc推送总是卡,所以改变了线程数

      dvc remote modify --local minio  jobs 4
      

ERROR: Checkout failed for following targets
https://discuss.dvc.org/t/cant-go-to-former-version-of-dataset-with-dvc-checkout/615

dvc checkout -v 

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com