Are you sure you want to delete this access key?
This file contains the commands for the DVC Tracking part in the DAGsHub Walkthrough session.
We will start by cloning the repository to the local machine
git clone https://dagshub.com/<DAGsHub-user-name>/<repo-name>.git
We recommend you create and activate a virtual environment before moving forward
Make sure you're in the project directory when following this.
If you're using Python 2, replace venv
with virtualenv
in the below commands.
The name of the virtual environment is for you to choose. The convention is 'env' or 'venv'.
We will add the virtual environment name to the .gitignore
file, so Git will not track it.
python3 -m venv <virtual-environment-name>
echo <virtual-environment-name> >> .gitignore
source <virtual-environment-name>/bin/activate
py -m venv <virtual-environment-name>
echo venv >> .gitignore
<virtual-environment-name>/Scripts/activate.bat
Install DVC on the virtual environment and initialize it.
pip install dvc
dvc init
Track the DVC config files using Git
git add .dvc .dvcignore
git commit -m "init dvc"
When you create a DAGsHub project, it is automatically configured with its own DAGsHub Storage remote. To configure it locally, all you need to do is copy and paste four commands from your DAGsHub repository to your CLI.
Copy the commands form the DAGsHub repository, under the remote, to your CLI
dvc remote add origin https://dagshub.com/<DAGsHub-user-name>/<repo-name>.dvc
dvc remote modify origin --local auth basic
dvc remote modify origin --local user <DAGsHub-user-name>
dvc remote modify origin --local password your_token
Track the changes to the DVC config files using Git
git add .dvc/config
git commit -m "set dvc remote"
Create a new file
echo >> dvc_demo.txt
Add the new file to DVC tracking.
dvc add dvc_demo.txt
Track the changes that were made to Git tracked files:
git add .gitignore dvc_demo.txt.dvc
git commit -m "add dvc_demo.txt to dvc tracking"
Push the files to DAGsHub remotes
dvc push -r origin
git push
Press p or to see the previous file or, n or to see the next file
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?