Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLama bindings for Mac OS not included in CPU #10

Open
juancc opened this issue Dec 4, 2024 · 0 comments
Open

LLama bindings for Mac OS not included in CPU #10

juancc opened this issue Dec 4, 2024 · 0 comments

Comments

@juancc
Copy link

juancc commented Dec 4, 2024

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:

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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant