-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Further tidy on Android instructions README.md #7077
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
Conversation
Fixed some logic when following readme direction
@@ -951,7 +966,7 @@ $ export NDK=<your_ndk_directory> | |||
$ cmake -DCMAKE_TOOLCHAIN_FILE=$NDK/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-23 -DCMAKE_C_FLAGS=-march=armv8.4a+dotprod .. | |||
$ make | |||
``` | |||
Install [termux](https://termux.dev/) on your device and run `termux-setup-storage` to get access to your SD card. | |||
Install [termux](https://github.com/termux/termux-app#installation) on your device and run `termux-setup-storage` to get access to your SD card (if Android 11+ then run the command twice). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason to run the command twice is the first run pops the Android Permission Window, then user accepts. Now the permission is granted, which allows Termux to setup the symlinks to shared storage after second execution.
mv model.gguf ~/ | ||
``` | ||
|
||
[Get the code](https://github.com/ggerganov/llama.cpp#get-the-code) & [follow the Linux build instructions](https://github.com/ggerganov/llama.cpp#build) to build `llama.cpp`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added link to Get the code so very new users can't miss it.
A new user arriving will see simple directions on llama.cpp homepage
Second, obtain the [Android NDK](https://developer.android.com/ndk) and then build with CMake: | ||
|
||
You can execute the following commands on your computer to avoid downloading the NDK to your mobile. Of course, you can also do this in Termux. | ||
Obtain the [Android NDK](https://developer.android.com/ndk) and then build with CMake: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Referring to termux doesn't make sense at this point - first step to building with ndk is obtain ndk.
Period after cmake, colon after termux
I think that's as clean as it gets! Let me know if there's anything you noticed that needs to be changed. |
method seems to be more correct, instead of alternative in this context
building llama.cpp with NDK on a pc doesn't require installing clang, cmake, git, or wget in termux.
@Jeximo this is renaming |
@slaren My apologies, I fixed the mistake. |
Fixed logic when following readme direction.
Some poor user got stuck trying to build
llama.cpp
. This change makes the usergit clone
before building.Listed Building with Termux, then Building with NDK as build directions should focus on what's necessary, whereas NDK instructions are optional. Removed redundency in NDK instruction.