如何将 Binder 与包含 Git-lfs 文件的 GitHub 存储库一起使用?

How do I use Binder with a GitHub repo that has Git-lfs files?

老问题:

我正在尝试使用 Binder to share my Git repo,但是 git 存储库有 git-lfs 文件。

如果我尝试在存在指向 git-lfs 文件的指针文件而不是实际文件时使用存储库,我会从 Binder 收到以下错误:Smudge error: Error downloading: [404] Object does not exist on the server.

如果我在实际 git-lfs 文件存在时尝试使用 repo,我会从 Binder 收到以下错误:Error: ErrImagePull.

新问题:

我尝试在 Binder 的 jupyter notebook 中打开 pickle 文件后得到一个 Pickling Error。

老问题的答案: 我将模型文件移至 Google 驱动器并使用 !wget 将其从笔记本中拉出以避免将文件存储在 Git-LFS 中。

新题答案: 我必须将所有软件包的版本固定到我在本地虚拟环境中使用的版本。

响应您的 post 目前 'How do I use Binder with a GitHub repo that has Git-lfs files?' 的标题。似乎有一个示例可能对您有所帮助。

如果你去Jupyter Discourse Forum and search 'git-lfs', you'll end up somewhere like here。目前有两个相关的 posts:

第二个参考 link 到 Emtion Faces: Emotion classifier trained with Fastai, displayed with a Jupyter notebook and Voila, deployed with Binder.,它使用 git-lfs 和 fastai 和 pickling 等它可能对你有帮助。
特别是关于 git-lfs,我注意到 pickle 文件存储在 git-lfs 中,参见 here