Closed itsderek23 closed 4 years ago
Thanks! So it seems if we purge the mechanical files will that help?
Yes - that will go a long way.
On Tue, Feb 25, 2020 at 1:57 PM Luxonis-Brandon notifications@github.com wrote:
Thanks! So it seems if we purge the mechanical files will that help?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/luxonis/depthai-python-extras/issues/36?email_source=notifications&email_token=AAAB5SCGJ2PWW64L62UW7ELREWA2PA5CNFSM4K3RL5QKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM5PBLA#issuecomment-591065260, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAB5SCF3JCM3ZBSWJBT7K3REWA2PANCNFSM4K3RL5QA .
Perfect, so I don't know how to do this but if it's not hard for you please do make it so. :-)
Bringing this up again because I'm having an almost impossible time updating a remote tester. Best speeds I can get is about 20kB/s, and I'm running into all kinds of time out issues and disconnects.
Yes, agreed. When we go to develop
, as in when we make develop into the main (default) branch, we will likely archive the whole repository and start from scratch to get back to standard practices. Which then should reduce the repo size a TON.
It was my practices at the beginning that caused the ballooning.
OK, I've done this before the hard way but I was happy to find there is now an easy way.
Follow these instructions and use 1M as your file size threshold (instructions chose 10M). This will get the repo size down to 167MB from 771 MB on disk.
That said, you really need to move the model files out of the repo. The less good option is making them a separate repo and optionally making them a submodule. The better solution is using git LFS to track file revisions but keeping the binary data out of the repo.
If you start a repo from scratch with the develop branch it's 163 MB on disk - basically the same as if you follow the TL;DR instructions below. If you remove the resource/nn
directory before creating the repo from scratch on develop then it shrinks it to less than 1 MB.
TL;DR Execute these commands on Ubuntu 18 to shrink the repo to 167 MB:
Install brew. sudo apt install brew
Add brew to path by updating ~/.bash_profile
to have lines:
export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"
export MANPATH="/home/linuxbrew/.linuxbrew/share/man:$MANPATH"
export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:$INFOPATH"
Then source ~/.bash_profile
to load the new path variables.
Install BFG. brew install bfg
Filter the repo with BFG: bfg -b 1M
Finalize the changes: git reflog expire --expire=now --all && git gc --prune=now --aggressive
Convince yourself it works: du -s
$ du -s
167064 .
Force push the diet soda that is the new repo: git push --force
Thanks @ColbyToland ! So on the models, we are planning in develop
to have these automatically downloaded from elsewhere. It sounds like git LFS will be a great approach. CC: @themarpe .
The model downloader seems to be working well in https://github.com/luxonis/depthai/pull/242. So this will allow us, once we get it into main
to rewrite the Github history to get the repo size down to ~1MB or so.
FIxed. Repo size was reduced by rewriting repo history.
Thanks, Szabi. And thanks @ColbyToland for the advice here. :-)
.git/objects/pack (295 MB)
The largest chunk of this is from a large file within
.git/objects/pack
(295 MB):These appear to be from the mechanical files which have been removed from the repo:
See this comment from another repo w/a similar issue on how to cleanup this disk space.
nn folder (66 MB)
/cc @Luxonis-Brandon