Hi,
I’m using a repo to build App on HF, but when it runs it always report the following error:
Traceback (most recent call last):
File "/home/user/.local/lib/python3.8/site-packages/huggingface_hub/repository.py", line 742, in clone_from
run_subprocess("git lfs install", self.local_dir)
File "/home/user/.local/lib/python3.8/site-packages/huggingface_hub/utils/_subprocess.py", line 61, in run_subprocess
return subprocess.run(
File "/usr/local/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', 'lfs', 'install']' returned non-zero exit status 2.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "app.py", line 349, in
demo = build_interface()
File "app.py", line 335, in build_interface
callback.setup([user_choice, left, right], "flagged_data_points")
File "/home/user/app/hfserver.py", line 342, in setup
self.repo = huggingface_hub.Repository(
File "/home/user/.local/lib/python3.8/site-packages/huggingface_hub/utils/_deprecation.py", line 101, in inner_f
return f(*args, **kwargs)
File "/home/user/.local/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 124, in _inner_fn
return fn(*args, **kwargs)
File "/home/user/.local/lib/python3.8/site-packages/huggingface_hub/repository.py", line 528, in __init__
self.clone_from(repo_url=clone_from)
File "/home/user/.local/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 124, in _inner_fn
return fn(*args, **kwargs)
File "/home/user/.local/lib/python3.8/site-packages/huggingface_hub/repository.py", line 797, in clone_from
raise EnvironmentError(exc.stderr)
OSError: Hook already exists: post-checkout
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-checkout'.\n"; exit 2; }
git lfs post-checkout "$@"
To resolve this, either:
1: run `git lfs update --manual` for instructions on how to merge hooks.
2: run `git lfs update --force` to overwrite your hook.
Any idea on how to solve this?
Thx