Skip to content

LLama bindings for Mac OS not included in CPU #10

@juancc

Description

@juancc

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions