Last active
June 25, 2021 15:22
-
-
Save seunboy1/f0d2ed76cabee865eeca7a9a6042b59e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Version TF record saved on s3 | |
dvc_track_files() { | |
git init | |
#initialise dvc in a git directory | |
dvc init | |
# helps to prevent duplication by creating an hash of the data in remote | |
dvc remote add s3cache s3://mybucket/cache | |
dvc config cache.s3 s3cache | |
# start tracking a file or directory with dvc | |
dvc add --external s3://mybucket/existing-data | |
# add, commit and push file to snapshot | |
git add existing-data.dvc | |
TAG="V2" | |
git commit -m "Data ${TAG}" | |
git tag ${TAG} | |
echo "Successfully updated data!!!" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment