pip install dvc # or dvc[s3], dvc[gs], dvc[ssh]★Install with the extras for your remote (dvc[s3],[gs],[azure],[ssh]…). Also via brew/conda/choco. Python 3.9+.git init && dvc init★DVC lives inside a Git repo.dvc initcreates.dvc/; commit it. Run from the repo root.git add .dvc .dvcignore && git commit -m "init dvc"Commit the DVC config..dvcignoreworks like.gitignorefor DVC's scanning.dvc version · dvc doctordvc doctorreports version, platform, and which remote backends are available.
dvc add data/train.csv★DVC moves the file to its cache and writes a smalldata/train.csv.dvcpointer (a hash). The real file is now git-ignored.git add data/train.csv.dvc data/.gitignore git commit -m "track dataset"★Commit the.dvcpointer + the auto-generated.gitignoreto Git. Git now versions the pointer; DVC versions the bytes.dvc add data/ # a whole directoryTrack directories too — one.dvcfile summarizes the whole tree.dvc status · dvc checkout · dvc commitstatusshows data drift vs. the pointer;checkoutrestores cached data into the workspace;commitupdates a pointer after changing tracked data.
dvc remote add -d storage s3://bucket/path★Configure a default (-d) remote — where the actual data lives. Backends: S3, GCS, Azure, SSH, HDFS, HTTP, local dir.dvc push★Upload cached data to the remote (likegit pushfor bytes). Do this afterdvc add/repro+ the Git commit.dvc pull★Download the data referenced by the current commit's pointers. The typical clone flow:git clone→dvc pull.dvc remote modify storage endpointurl https://... # S3-compatiblePer-remote settings (endpoint, credentials, region). Use--localto keep secrets out of Git-tracked config.