Guide to connect git repo to jupyter notebook in paperspace 2020 - johan-github/proj GitHub Wiki
Using Jupyter notebook in Paperspace is different from using a local destination (folder).
Since the notebook is used as a cloud-based platform, we need to use the terminal in that enviroment.
-
At first, if you don't know what Paperspace is or why you should use it, please find some information and return here later. This guide will be using the free options of 'Gradient', container: 'Pytorch' and 'GPU NVIDA QUADRO M4000'. NOTE: If you choose Tensorflow instead of Pytorch, this might not work, it didn't work in my case.
-
Open up a 'terminal' in your Jupyter notebook via Paperspace.
-
To make sure we are in the correct destination, type 'dir' and press Enter. Now the terminal should be presenting the files that's on the left.
-
Login to your Github-account and create a new repo (repository). Do NOT initialize with a 'README.md' file! Set a easy to remember repo-name.
-
Go back to your now running Jupyter notebook in Paperspace.
-
In terminal, type (never type '$'): $ git init $ git add README.md $ git commit -m "first commit" $ git remote add origin https://github.com/your_username/name_of_repo.git $ git push -u origin master NOTE: Change 'your_username' to YOUR Github-username and 'name_of_repo' to YOUR repo-name. Also, the terminal will be asking for your username, e-mail address connected to your Github and password, please follow the instructions. While typing in password, none letters will show. Not even '*', but I assure you that the terminal will read the password. If you can't remember your password and need a couple of attempts, just type in the previous command and you'll be back on track.
To check if everything worked out, add one of your already existing files to git by:
- git add file_name.ipynb
- git commit -m "added file_name.ipynb"
- git push origin master
- Follow instructions in terminal (enter username and password)
- Go to github.com and enter your repo and check if your file has been added to your repo. NOTE: "file_name.ipynb" is an example, enter whatever name of your file that you have chosen.
I hope this guide was helpful, have fun!