Installation DVC on MinIO storage

Viewed 1547

Does anybody install DVC on MinIO storage?

I have read docs but not all clear for me.

Which command should I use for setup MinIO storage with this entrance parameters:

storage url: https://minio.mysite.com/minio/bucket-name/ login: my_login password: my_password

1 Answers

Install

I usually use it as a Python package, int this case you need to install:

pip install "dvc[s3]"

Setup remote

By default DVC supports AWS S3 storages and they work fine.
Also they support "S3-compatible storage", but setup for this type of remotes is nod described properly. In particular case of MinIO you have bucket - directory on MinIO server where actual data stores (it is similar to AWS bucket), but DVC uses AWS CLI to authenticate. In case of MinIO you need to pass them explicitly.

Then follow commands to setup your DVC remote:

# setup default remote (change "bucket-name" to your minio backet name)
dvc remote add -d minio s3://bucket-name -f

# add information about storage url (where "https://minio.mysite.com" your url)
dvc remote modify minio endpointurl https://minio.mysite.com

#  add info about login and password
dvc remote modify minio access_key_id my_login
dvc remote modify minio secret_access_key my_password

If you move from old remote, use follow command to move your data:

Before setup (download all old remote cache to local machine):

dvc pull -r <old_remote_name> --all-commits --all-tags --all-branches

After setup (upload all cache to a new remote):

dvc push -r <new_remote_name> --all-commits --all-tags --all-branches
Related