【数据管理】dvc推送数据到ssh服务器上

1.环境准备

ubuntu20.04
python3.8

# pip install 
dvc
'dvc[ssh]'

2.数据准备

dvc_test
--gallery_data.zip

3.命令

# 进入自建的一个dvc_test的目录下
cd dvc_test 

# dvc初始化(需要先git init),此时会在目录下生成一个.git与.dvc文件夹
git init 
dvc init

# 将要上传的数据add,生成gallery_data.zip.dvc文件
dvc add gallery_data.zip

# dvc添加远程ssh各项配置
dvc remote add --default ssh-storage ssh://your_username@ip_1.ip_2.ip_3.ip_4:your_port/home/your_username/path/to/storage/dvc_test
dvc remote modify ssh_storage user your_username
dvc remote modify ssh_storage port your_port
dvc remote modify --local ssh_storage password your_password

# dvc push data to ssh server(md5加密格式存在远程服务器)
dvc push

# dvc pull 拉取到本地,解密后存到本地(只需要.git,.dvc,gallery_data.zip.dvc文件,放到对应目录下,就可以将文件下载到该目录下)
dvc pull


4.参考

1.数据版本管理 DVC data version control 和git一起管理你的机器学习实验数据

2.Data Version Control Simple Tutorial (DAC)

3.ssh dvc

4.官方dvc教程​​​​​​​

Guess you like

Origin blog.csdn.net/qq_35975447/article/details/120195355