Yup you always have to create it manually the first time. It doesn’t get auto-generated.
Hi Jeremy. Thanks for answering all my questions. A simplified version of my question. Is git push necessary for the commit. For example, I don’t see the file test1 added in my repo until I do git push. Please see code below. This works but I just wanted to see why am I having to use git push because I am not sure if I saw that being used in Walkthru 2. Thanks!
root@n5pajbeqrb:~/git/walkthru2# vim test1
root@n5pajbeqrb:~/git/walkthru2# cat test1
this is a test script in vim
root@n5pajbeqrb:~/git/walkthru2# git add test1
root@n5pajbeqrb:~/git/walkthru2# git commit -m ‘test1 add commit’
[main 687dabb] test1 add commit
1 file changed, 1 insertion(+)
create mode 100644 test1
root@n5pajbeqrb:~/git/walkthru2# git push
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 289 bytes | 289.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
7636928…687dabb main → main
commit commits it to your local copy of the repo.
push sends it to the server.
Thanks and I found that you did explain this in the last few minutes of Walkthrough 2. Sorry to take your time. Really amazing to go back and learn from the walk-through sessions. Sandeep
pwd to check which folder you were in. You need to be in your home directory.
Alternatively, use the tilda for an absolute-reference to your home directory…
Plus btw, that file wont exist until
git config is run once. You could instead start with a blank file using…
Homebrew is an OS level package manager for macOS. Paperspace uses Linux (Ubuntu) based containers. So you don’t need to install it on paperspace. For parts of Jeremy’s walkthru, he was using his own macbook laptop that’s why it probably got mentioned.
Tmux is a terminal multiplexer. Paperspace emulates a vt100 or some such over the web. If you’re directly SSH’ing into your paperspace instance, then sure, you may want to install it and if you want it to persist, you could install it in a non-perishable directory like storage and then symlink it or put the location in the path. It’s a small Linux binary, maybe a few MB in size so it won’t hurt your disk situation too much IMO.
Some additional background info for git newbies…
At 20:20 when Jeremy says “just say yes”…
…this applies mainly to when you connect to a new host or service for the first time.
Thereafter, this question should not appear again for that service unless:
You are experiencing a Man-In-The-Middle attack (actually unlikely)
You are connecting to the wrong host, or the server changed.
The service changes its key (you can manually check github’s fingerprints here).
You can see the ECDSA one matching my snapshot.
Note, known_hosts is an SSH facility rather than GIT facility, where you can see the updated file using…
Here is some troubleshooting info for this error.
Ignore the bit about ssh-agent, which is only useful if you use a pass-phrase on your private key, which I never do when using my personal laptop (I might use a pass-phrase from a shell on a cloud server administered by others).
The walkthru video describes file id_rsa.pub as the public key to be installed on the git servers, but leaves it implicit that the other file id_rsa is the private key. To be explicit, the id_rsa file should not be shared (although you might copy it to another private server of yours, versus doing a new ssh-keygen on that server).
The following is not required knowledge, but helps build a sense of mastery.
Info graphic of SSH authentication…
I must have been tired at the end of the video since I missed seeing the discussion here on this sentencepiece ModuleNotFoundError.
I’m commenting here to make this error searchable.
The error message says to run…
pip install, but that didn’t work for me.
In the video Jeremy uses…
mamba install -c fastchan sentencepiece, which did work.
You can use tmux in the browser terminal in JupyterLab too BTW.
pip install should work fine too. That’s what I normally do.
Oh I see that it’s got a `<0.1.90’ restriction on what it says to do. That shouldn’t be there any more. I better get rid of that!
The latest paperspace containers (see layer 16) – from which I assume the paperspace notebook instances get built – also specifically install “sentencepiece<0.1.90” .
RUN |1 BUILD=prod /bin/sh -c pip install albumentations catalyst captum "fastprogress>=0.1.22" graphviz jupyter kornia matplotlib "nbconvert<6" nbdev neptune-client opencv-python pandas pillow pyarrow pydicom pyyaml scikit-learn scikit-image scipy "sentencepiece<0.1.90" spacy tensorboard wandb # buildkit
I’m hoping after your change, their CI will pick it up.
True! I have avoided it so far though, because all the CTRL key combinations have to go through the browser and the Jupyter Lab to get to the terminal being emulated (in a JL tab in a chrome tab) … just to avoid unexpectedness at the most inopportune moment.
Jeremy, I also noticed as well - so like can I humbly mention please:
When going through the live sessions, when you cross-over from the terminal to, for example, vim, and then move back to the terminal, etc, like that - then, please remember to say what keyboard short cut you used for moving between the two instances… I think it would be really helpful.
Jeremy, I noticed that although we never explicitly install git on our Ubuntu virtual machine on our computer, we are able to use git.
So, I am just wondering, and guessing that git was probably installed as part of our installation of: GitHub - fastai/fastsetup: Setup all the things - right? Just curious.
I never get the sentencepiece error (re: the end of this recording) - well, I’m guessing, Jeremy, that you have since resolved this in the fastbook, that’s why.
When switching windows it’s specific to what operating system you use, so I’m not sure how helpful that is? But please do feel free to ask here if there’s some particular thing you see me do that you’re not sure how, and tell me what OS you use so I can make sure it’s suitable for your platform.
git is preinstalled on paperspace fast.ai instances IIRC.
I forked the fastbook repository sometime ago (a couple of months ago), so my version on my Github says “43 commits behind fastai: master” - this means my version is 43 commits behind your version, right, Jeremy? How do I resolve this, such that my version becomes in line with your version now?
So, in general, when a forked repository says stuff is “ahead”, it means that our version has been changed, and if it says “behind”, that means our version is an older copy of the original repository, as there has since been changes made to the original version - and then, of course, we need to get our version in line with the original.
At the above note, just wondering please: is there perhaps an easy or automatic way where we could ensure that our forked repository is always in line with the original repository please? I guess that would be really helpful. Hmmm…
Your github fork should have a magic button that says “Fetch Upstream” which will do exactly that for you!
See my screenshot below:
The latest tag for Paperspace docker container has this info. Step 15 in the following tag for example.
For some reason, I don’t see git explicitly mentioned in their Dockerfile found on their github though. I was under the impression that they were building the tags from that Dockerfile. Still some mystery there.