Install and use Git for ECE 417
09 Mar 2023This is a quick guide on how to install and use Git for our ECE 417 project. This is not a tutorial nor an extensive explanation on how to use Git, but rather a quick guide on how to install it and use it for this particular research project.
Install Git
If you want to understand why we are using git and how it exactly works, you can read about it on the Atlassian documentation, which turns out to be really good in my opinion. However, they recommend the use of BitBucket for the repo hosting, where we go with Github. To install Git, you can follow the instructions on the Git website.
Create a Github account
If you don’t have one already, you can create a Github account here. You can use your university email address, or any other email address.
Create a Github repository
I will manage this part myself, and add you to the repo. You need to to send me a message with the mail associared to your Github account.
Generate a SSH key
To be able to easily push and pull from the repository (without authentifying yourself everytime), you need to generate a SSH key. You can follow the instructions on the Github documentation.
Clone the repository
Once you have generated your SSH key, you can clone the repository. This will copy the remote code to your local directory and setup the local git repo. To do so, you can use the following command in the directory where you want to clone the repository:
git clone git@github.com:eliasmyers/ECE-417-Project.git
Push and pull from the repository
Before pushing any modification, you should always pull from the repository to make sure you have the latest version. If you don’t there is a high risk of needing to perform complicated merges. To do so, you can use the following command is the github repository folder:
git pull
After you have made some changes, you can commit and push them to the repository. To do so, you can use the followings commands:
If you have created a new file, you also need to add it to the listed of tracked files:
git add <file>
Then you can commit your changes, with a message describing what you have done. The commit will saves the changes locally, but not on the remote repository
git commit -m "your message"
Finally, you can push your changes to the remote repository:
git push
Install pytorch
To install pytorch, you can follow the instructions on the pytorch website. You can choose the version you want, but I would recommend the latest stable version. You can also choose the version of CUDA you want to use, but I would recommend the latest stable version. If you don’t have a GPU, you can choose the CPU version.
Install python packages using pip3
pip3 install <package>
Download python packages
pip3 install -r requirements.txt