huggingface / huggingface/meshgen

LLama bindings for Mac OS not included in CPU

Open
#10 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
919
Forks
77
Avg merge
34m
Merged PRs (30d)
1

Description

LLama bindings for Mac OS not included.
Requirement.txt path not in absolute.

As the folder "dependencies_dir" exists pip for installing llama_cpp_python is never called.
The problem is in operators.install_and_load_dependencies function
Modify this and show work:

```python
def install_and_load_dependencies():
install_pip()
install_devel()

dependencies_dir = absolute_path(".python_dependencies")
# if os.path.exists(dependencies_dir) and len(os.listdir(dependencies_dir)) > 2:
# print("Requirements already installed, skipping")
# load_dependencies()
# return

os.makedirs(dependencies_dir, exist_ok=True)

if (sys.platform == "win32" or sys.platform == "linux") and check_cuda():
requirements_file = "./requirements/cuda.txt"
else:
requirements_file = absolute_path("./requirements/cpu.txt")

subprocess.run(
[
sys.executable,
"-m",
"pip",
"install",
"-r",
requirements_file,
"--upgrade",
"--no-cache-dir",
"--target",
dependencies_dir,
],
check=True,
cwd=os.path.dirname(__file__),
)

load_dependencies()
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.