Skip to content

How to include the installation parameters and make BLAS arguments in the requirements.txt? #976

Closed Answered by abetlen
AayushSameerShah asked this question in Q&A
Discussion options

You must be logged in to vote

Cross-posted my answer from the issue.

@AayushSameerShah late reply but I have a bettter answer for you! In newer versions of pip it's possible to specify -C/--config-settings flag which passes args to the build tool (scikit-build-core in our case) so you can do

# requirements.txt
llama-cpp-python -C cmake.args="-DLLAMA_BLAS=ON;-DLLAMA_BLAS_VENDOR=OpenBLAS"

This is also documented now in the README.md now under CLI / requirements.txt. You may need to run pip install --upgrade pip if you get an error about the -C option to upgrade to a newer version of pip.

Hope this helps.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by abetlen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants