0

So, I have done countless reading online about Git LFS and how it works and still have been unable to find a conclusive solution for my problem. Basically, I am using Mozilla Deepspeech and I am trying to upload my project to Heroku via Github. However, since the Deepspeech files are so big, they must be uploaded with Git LFS. Which is fine, except now when I access the file path, I receive the pointer to the file with the SHA256 ID and not the actual binary. I am wondering if there is just no way to solve this or if it is possible to receive the actual file contents. Thanks for the help. Code is below (This is the correct path btw)

const DeepSpeech = require('deepspeech')
let modelPath = './deepspeech/deepspeech-0.9.3-models.pbmm'
let scorerPath = './deepspeech/deepspeech-0.9.3-models.scorer'

let model = new DeepSpeech.Model(modelPath)
model.enableExternalScorer(scorerPath)
Data loss: Corrupted memmapped model file: ./deepspeech/deepspeech-0.9.3-models.pbmm Invalid directory offset
throw `CreateModel failed: ${binding.ErrorCodeToErrorMessage(status)} (0x${status.toString(16)})`;
CreateModel failed: Failed to initialize memory mapped model. (0x3000) 
ribru17
  • 1
  • 4

2 Answers2

1

In general, you need to have run git lfs install once on your system to set up the filter commands unless that has already been done by your operating system's packaging (such as Git for Windows and Debian's git-lfs package). Once you've done that, Git will automatically invoke Git LFS to download the files.

However, doing that won't fix the existing repository. You can use git lfs pull to do that, or it will be automatically done next time you check out a branch.

Note that if you keep your .gitconfig in a dotfiles repository, you'll want to commit the changes that git lfs install makes to your .gitconfig, or the next time you overwrite it, you'll end up back in this situation. If you do that, you don't need to run git lfs install on any system where you have that .gitconfig installed.

bk2204
  • 64,793
  • 6
  • 84
  • 100
0

Need to setup git lfs on the repo:

git lfs install

Then:

git lfs pull
Gonzalo Matheu
  • 8,984
  • 5
  • 35
  • 58