Skip to content

Instantly share code, notes, and snippets.

@seunboy1
Created June 14, 2021 11:26
Show Gist options
  • Save seunboy1/f70d5df891aca0409d583b14f499443b to your computer and use it in GitHub Desktop.
Save seunboy1/f70d5df891aca0409d583b14f499443b to your computer and use it in GitHub Desktop.
How to track a local file (model or data)
#!/bin/bash
# Version TF record
dvc_track_files() {
dvc init
dvc add data.tfrecord
dvc remote add -d storage s3://mybucket/datastorage
dvc push
git add data.tfrecord.dvc .gitignore .dvc/config
TAG="V1"
git commit -m "Created data ${TAG}"
git tag ${TAG}
git push
rm -rf .dvc/cache
rm -f data.tfrecord
dvc pull
}
dvc_track_files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment