-
Notifications
You must be signed in to change notification settings - Fork 175
feat: update mllm-cli and android build tasks #605
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ This document describes the MLLM command-line interface (CLI) tool, which operat | |
|
|
||
| **Currently, the system officially supports the following models:** | ||
|
|
||
| * **LLM**: ``mllmTeam/Qwen3-0.6B-w4a32kai`` | ||
| * **LLM**: ``mllmTeam/Qwen3-0.6B-w4a32kai,mllmTeam/Qwen3-4B-w4a8-i8mm-kai`` | ||
| * **OCR**: ``mllmTeam/DeepSeek-OCR-w4a8-i8mm-kai`` | ||
|
|
||
| This guide covers three main areas: | ||
|
|
@@ -136,168 +136,101 @@ Once configured, you can click the **Check** button to ensure the connection is | |
| Build Configuration Guide | ||
| ------------------------- | ||
|
|
||
| The Go build tasks (`build_android_mllm_server.yaml` and `build_android_mllm_client.yaml`) use hardcoded paths that are specific to the build server's environment. If you are setting up a new build environment, you **must** modify these paths before proceeding to compilation. | ||
| Go build tasks (`build_android_mllm_server.yaml` and `build_android_mllm_client.yaml`) now use **dynamic paths** (via `$(pwd)`) to locate project files. This makes the scripts much more portable. | ||
|
|
||
| Understanding the Build Scripts | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| The core of the cross-compilation logic for Go is within the `ShellCommandTask` of the `.yaml` build files. It sets several environment variables to configure `cgo` for cross-compiling to Android ARM64. | ||
|
|
||
| * ``GOOS=android``, ``GOARCH=arm64``: Tells Go to build for Android ARM64. | ||
| * ``CGO_ENABLED=1``: Enables ``cgo`` to allow Go to call C/C++ code. | ||
| * ``CC`` and ``CXX``: Specifies the C and C++ compilers from the Android NDK, used to compile any C/C++ parts within the Go program. | ||
| * ``CGO_CFLAGS``: Tells the C compiler where to find the MLLM C API header files (e.g., ``Runtime.h``). | ||
| * ``CGO_LDFLAGS``: Tells the linker where to find the compiled MLLM shared libraries (``.so`` files) that the final executable needs to link against. | ||
|
|
||
| Modifying Hardcoded Paths | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| The two most critical variables you will need to change are `CGO_CFLAGS` and `CGO_LDFLAGS`. | ||
|
|
||
| **Example from `build_android_mllm_server.yaml`**: | ||
|
|
||
| .. code-block:: yaml | ||
| However, there are still specific environment configurations you **must** check and modify to match your local build machine. | ||
|
|
||
| # ... | ||
| export CGO_LDFLAGS="-L/root/zty_workspace/mllm_zty/build-android-arm64-v8a/bin" | ||
| export CGO_CFLAGS="-I/root/zty_workspace/mllm_zty" | ||
| # ... | ||
| Open `tasks/build_android_mllm_server.yaml` and check the following variables: | ||
|
|
||
| **How to Modify**: | ||
| 1. **``ANDROID_NDK_HOME`` (Critical)** | ||
| The script assumes the NDK is located at `/opt/ndk/android-ndk-r28b`. | ||
| * **Action:** Change this path to the actual location of the Android NDK on your machine. | ||
|
|
||
| 1. **``CGO_CFLAGS="-I/path/to/your/project/root"``** | ||
| The `-I` flag specifies an include directory. This path should point to the root of the MLLM project directory on your build server, where the `mllm/c_api/` headers are located. In the example, this is `/root/zty_workspace/mllm_zty`. Change this to match your project's location. | ||
| 2. **``GOPROXY`` (Network)** | ||
| The script uses `https://goproxy.cn` to accelerate downloads in China. | ||
| * **Action:** If you are outside of China, you may remove this line or change it to `https://proxy.golang.org`. | ||
|
|
||
| 2. **``CGO_LDFLAGS="-L/path/to/your/compiled/libs"``** | ||
| The `-L` flag specifies a library directory. This path must point to the directory where the C++ build (Step 1) placed the `.so` files. In the example, this is `/root/zty_workspace/mllm_zty/build-android-arm64-v8a/bin`. If your build output directory is different, you must update this path accordingly. | ||
|
|
||
| By correctly updating these two paths in both `build_android_mllm_server.yaml` and `build_android_mllm_client.yaml`, you can adapt the build process to any server environment. | ||
|
|
||
| Compilation and Deployment | ||
| -------------------------- | ||
|
|
||
| This section provides the complete workflow for compiling all C++ and Go components, deploying them to an Android target, and running the system. | ||
| This section outlines the workflow for compiling the C++ and Go components and deploying them directly to an Android device. | ||
|
|
||
| Prerequisites | ||
| ~~~~~~~~~~~~~ | ||
|
|
||
| * A build environment, such as a server or Docker container, with the Android NDK and Go compiler installed, hereinafter referred to as the 'build server'. | ||
| * An Android target device with `adb` access enabled. | ||
| * `rsync` and `scp` for file synchronization between your development machine and the build server. | ||
| * Android NDK and Go compiler installed and configured. | ||
| * An Android device connected via `adb`. | ||
|
|
||
| Step 1: Compile C++ Core Libraries | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| First, we compile the MLLM C++ core, which produces the essential shared libraries (`.so` files). | ||
|
|
||
| 1. **Sync Code to Build Server**: | ||
| Synchronize your local project directory with the build server. | ||
|
|
||
| .. code-block:: bash | ||
| Compile the MLLM C++ core to generate the required shared libraries (`.so` files). | ||
|
|
||
| # Replace <port>, <user>, and <build-server-ip> with your server details | ||
| rsync -avz --checksum -e 'ssh -p <port>' --exclude 'build' --exclude '.git' ./ <user>@<build-server-ip>:/your_workspace/your_programname/ | ||
| 1. **Configure Build Script**: | ||
| Ensure `tasks/build_android.yaml` is configured with your NDK path. | ||
|
|
||
| 2. **Run the Build Task**: | ||
| On the build server, execute the build task. This task uses `tasks/build_android.yaml` to configure and run CMake. | ||
| 2. **Run Compilation**: | ||
| Execute the build task from the project root. | ||
|
|
||
| Before executing this step, you also need to ensure that the hardcoded directories in build_android.yaml have been modified to match your requirements. The modification method is the same as for the Go compilation file mentioned earlier. | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| # These commands are run on your build server. | ||
| cd /your_workspace/your_programname/ | ||
| python task.py tasks/build_android.yaml | ||
|
|
||
| 3. **Retrieve Compiled Libraries**: | ||
| After the build succeeds, copy the compiled shared libraries from the build server back to your local machine. These libraries are the C++ backend that the Go application will call. | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| # You run these commands on your local machine to copy the files from the build server. | ||
| # Navigate to your local build artifacts directory | ||
| cd /path/to/your/local_artifacts_dir/ | ||
|
|
||
| # Copy the libraries | ||
| scp -P <port> <user>@<build-server-ip>:/your_workspace/your_programname/build-android-arm64-v8a/bin/libMllmRT.so . | ||
| scp -P <port> <user>@<build-server-ip>:/your_workspace/your_programname/build-android-arm64-v8a/bin/libMllmCPUBackend.so . | ||
| scp -P <port> <user>@<build-server-ip>:/your_workspace/your_programname/build-android-arm64-v8a/bin/libMllmSdkC.so . | ||
| **Output**: The compiled libraries (`libMllmRT.so`, `libMllmCPUBackend.so`, `libMllmSdkC.so`) will be located in `build-android-arm64-v8a/bin/`. | ||
|
|
||
| Step 2: Compile the Go Server | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| Next, cross-compile the Go server application for Android. | ||
| Cross-compile the Go server application for Android. | ||
|
|
||
| 1. **Sync Code**: Ensure your latest Go code is on the build server. This is only necessary if you've made changes to the Go server files (e.g., in the ``mllm-cli`` directory). | ||
|
|
||
| 2. **Run the Build Task**: | ||
| On the build server, execute the server build task. Make sure you have correctly configured the hardcoded paths in this YAML file as described in the "Build Configuration Guide" section. | ||
| 1. **Run Compilation**: | ||
| Execute the server build task. | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| cd /your_workspace/your_programname/ | ||
| python task.py tasks/build_android_mllm_server.yaml | ||
|
|
||
| 3. **Retrieve the Executable**: | ||
| Copy the compiled `mllm_web_server` binary from the build server back to your local machine. | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| # Navigate to your local build artifacts directory | ||
| cd /path/to/your/local_artifacts_dir/ | ||
|
|
||
| # Copy the executable | ||
| scp -P <port> <user>@<build-server-ip>:/your_workspace/your_programname/build-android-arm64-v8a/bin/mllm_web_server . | ||
| **Output**: The executable `mllm_web_server` will be generated in `build-android-arm64-v8a/bin/`. | ||
|
|
||
| Step 3: Compile the Go Client | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| If you are using Chatbox or a similar client, you can skip this step. | ||
| Step 3: Compile the Go Client (Optional) | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| Similarly, compile the Go client application. | ||
| If you need the command-line WebSocket client, compile it using the following task. | ||
|
|
||
| 1. **Sync Code**: Ensure your latest Go client code is on the build server. | ||
|
|
||
| 2. **Run the Build Task**: | ||
| On the build server, execute the client build task. This also requires the build YAML to be correctly configured. | ||
| 1. **Run Compilation**: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| cd /your_workspace/your_programname/ | ||
| python task.py tasks/build_android_mllm_client.yaml | ||
|
|
||
| 3. **Retrieve the Executable**: | ||
| Copy the compiled `mllm_ws_client` binary from the build server to your local machine. | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| # Navigate to your local build artifacts directory | ||
| cd /path/to/your/local_artifacts_dir/ | ||
|
|
||
| # Copy the executable | ||
| scp -P <port> <user>@<build-server-ip>:/your_workspace/your_programname/build-android-arm64-v8a/bin/mllm_ws_client . | ||
| **Output**: The executable `mllm_ws_client` will be generated in `build-android-arm64-v8a/bin/`. | ||
|
|
||
| Step 4: Deploy to Target Device | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| Push all compiled artifacts (libraries and executables) to your target Android device. | ||
| Push the compiled artifacts directly from the build output directory to your Android device using `adb`. | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| # Connect to your device if you haven't already | ||
| adb connect <device-id-or-ip:port> | ||
| # 1. Connect to device (if not already connected via USB) | ||
| adb connect <device-ip:port> | ||
|
|
||
|
Comment on lines
+217
to
218
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Clarify connection method in comment. The comment states "if not already connected via USB" but the command Consider updating the comment to reflect the actual use case: 📝 Suggested correction- # 1. Connect to device (if not already connected via USB)
+ # 1. Connect to device over network (skip if already connected via USB or network)
adb connect <device-ip:port>Or if USB is assumed: - # 1. Connect to device (if not already connected via USB)
- adb connect <device-ip:port>
+ # 1. Ensure device is connected (via USB or run 'adb connect <device-ip:port>' for network)🤖 Prompt for AI Agents |
||
| # Push the shared libraries from your local artifacts directory | ||
| adb push libMllmRT.so /path/to/your/deployment_dir/ | ||
| adb push libMllmCPUBackend.so /path/to/your/deployment_dir/ | ||
| adb push libMllmSdkC.so /path/to/your/deployment_dir/ | ||
| # 2. Push libraries and executables | ||
| # Navigate to the build output directory | ||
| cd build-android-arm64-v8a/bin/ | ||
|
|
||
| # Push the server and client executables | ||
| adb push mllm_web_server /path/to/your/deployment_dir/ | ||
| # Define your target directory on Android (e.g., /data/local/tmp/mllm/) | ||
| export ANDROID_DIR=/data/local/tmp/mllm/ | ||
|
|
||
| # (Optional) Push the Go client if you compiled it in Step 3 | ||
| adb push mllm_ws_client /path/to/your/deployment_dir/ | ||
| # Push files | ||
| adb push libMllmRT.so $ANDROID_DIR | ||
| adb push libMllmCPUBackend.so $ANDROID_DIR | ||
| adb push libMllmSdkC.so $ANDROID_DIR | ||
| adb push mllm_web_server $ANDROID_DIR | ||
|
|
||
| # (Optional) Push client if compiled | ||
| # adb push mllm_ws_client $ANDROID_DIR | ||
| Step 5: Running and Testing | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
|
|
@@ -352,4 +285,4 @@ You should now be able to interact with the model from the client terminal. Type | |
| adb forward tcp:8081 tcp:8080 | ||
|
|
||
| 3. **Open Chatbox**: | ||
| Open the Chatbox application on your host machine and configure it according to the "Alternative Client: Chatbox" section above. You can now chat with the model through the GUI. | ||
| Open the Chatbox application on your host machine and configure it according to the "Alternative Client: Chatbox" section above. You can now chat with the model through the GUI. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,35 +1,34 @@ | ||
| module mllm-cli | ||
|
|
||
| go 1.22.2 | ||
| go 1.23.0 | ||
|
|
||
| require ( | ||
| github.com/charmbracelet/bubbles v0.21.0 | ||
| github.com/gorilla/websocket v1.5.3 // | ||
| ) | ||
| toolchain go1.24.11 | ||
|
|
||
| require github.com/charmbracelet/bubbles v0.21.0 | ||
|
|
||
| require ( | ||
| github.com/atotto/clipboard v0.1.4 // indirect | ||
| github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect | ||
| github.com/charmbracelet/bubbletea v1.3.4 // indirect | ||
| github.com/charmbracelet/bubbletea v1.3.4 | ||
| github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect | ||
| github.com/charmbracelet/lipgloss v1.1.0 // indirect | ||
| github.com/charmbracelet/lipgloss v1.1.0 | ||
| github.com/charmbracelet/x/ansi v0.8.0 // indirect | ||
| github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect | ||
| github.com/charmbracelet/x/term v0.2.1 // indirect | ||
| github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | ||
| github.com/google/uuid v1.6.0 | ||
| github.com/lucasb-eyer/go-colorful v1.2.0 // indirect | ||
| github.com/mattn/go-isatty v0.0.20 // indirect | ||
| github.com/mattn/go-localereader v0.0.1 // indirect | ||
| github.com/mattn/go-runewidth v0.0.16 // indirect | ||
| github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect | ||
| github.com/muesli/cancelreader v0.2.2 // indirect | ||
| github.com/muesli/termenv v0.16.0 // indirect | ||
| github.com/muesli/termenv v0.16.0 | ||
| github.com/rivo/uniseg v0.4.7 // indirect | ||
| github.com/sahilm/fuzzy v0.1.1 // indirect | ||
| github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect | ||
| golang.org/x/sync v0.11.0 // indirect | ||
| golang.org/x/sys v0.35.0 // indirect | ||
| golang.org/x/term v0.34.0 | ||
| golang.org/x/text v0.3.8 // indirect | ||
| github.com/google/uuid v1.6.0 | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ package mllm | |
| #cgo CFLAGS: -std=c11 | ||
| #cgo LDFLAGS: -lMllmSdkC -lMllmRT -lMllmCPUBackend | ||
|
|
||
| #include <mllm/mllm-c.h> | ||
| #include "mllm/c_api/Runtime.h" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Find Runtime.h header file
echo "=== Searching for Runtime.h ==="
fd -t f "Runtime.h"
echo -e "\n=== Searching for mllm/c_api directory ==="
fd -t d "c_api"
echo -e "\n=== Listing files in mllm/c_api if it exists ==="
find . -type d -name "c_api" -exec ls -la {} \;Repository: UbiquitousLearning/mllm Length of output: 927 🏁 Script executed: #!/bin/bash
echo "=== Content of mllm/c_api/Runtime.h ==="
cat -n mllm/c_api/Runtime.h
echo -e "\n=== Checking c.go file (first 30 lines) ==="
head -n 30 mllm-cli/mllm/c.go
echo -e "\n=== Checking c.go file for all function calls ==="
grep -E "(isOk|initializeContext|shutdownContext|startService|stopService|setLogLevel|createQwen3Session|createDeepseekOCRSession|freeSession|insertSession|sendRequest|pollResponse|freeResponseString|MllmCAny)" mllm-cli/mllm/c.go | head -20Repository: UbiquitousLearning/mllm Length of output: 3590 🏁 Script executed: #!/bin/bash
echo "=== Content of mllm/c_api/Object.h ==="
cat -n mllm/c_api/Object.h
echo -e "\n=== Checking c.go for complete function usage ==="
grep -n "C\." mllm-cli/mllm/c.go | grep -E "(isOk|initializeContext|shutdownContext|startService|stopService|setLogLevel|createQwen3Session|createDeepseekOCRSession|freeSession|insertSession|sendRequest|pollResponse|freeResponseString)" | head -30
echo -e "\n=== Checking c.go file size and encoding ==="
wc -l mllm-cli/mllm/c.go
file mllm-cli/mllm/c.go
echo -e "\n=== Checking for trailing whitespace in c.go ==="
rg -n " $| $" mllm-cli/mllm/c.go
echo -e "\n=== Checking line endings in c.go ==="
file -b mllm-cli/mllm/c.go | grep -i "line"
echo -e "\n=== Checking for control codes in c.go ==="
od -c mllm-cli/mllm/c.go | grep -E "\\\\[0-7]{3}" | head -5Repository: UbiquitousLearning/mllm Length of output: 3533 🏁 Script executed: #!/bin/bash
echo "=== Complete analysis of trailing whitespace in c.go ==="
cat -n mllm-cli/mllm/c.go | grep -E " $| $"
echo -e "\n=== Count of lines with trailing whitespace ==="
grep -c " $\| $" mllm-cli/mllm/c.go
echo -e "\n=== Verify UTF-8 encoding ==="
hexdump -C mllm-cli/mllm/c.go | head -20
echo -e "\n=== Check for BOM ==="
head -c 3 mllm-cli/mllm/c.go | od -An -tx1Repository: UbiquitousLearning/mllm Length of output: 1034 🏁 Script executed: #!/bin/bash
echo "=== Reading c.go to show trailing whitespace context ==="
sed -n '65,75p' mllm-cli/mllm/c.go | cat -A
sed -n '78,90p' mllm-cli/mllm/c.go | cat -A
sed -n '130,145p' mllm-cli/mllm/c.go | cat -A
echo -e "\n=== Verify all C function declarations are present in Runtime.h ==="
echo "Functions used in c.go that must be declared in Runtime.h:"
echo "- initializeContext: $(grep -c 'initializeContext()' mllm/c_api/Runtime.h)"
echo "- shutdownContext: $(grep -c 'shutdownContext()' mllm/c_api/Runtime.h)"
echo "- isOk: $(grep -c 'isOk(' mllm/c_api/Runtime.h)"
echo "- startService: $(grep -c 'startService(' mllm/c_api/Runtime.h)"
echo "- stopService: $(grep -c 'stopService()' mllm/c_api/Runtime.h)"
echo "- setLogLevel: $(grep -c 'setLogLevel(' mllm/c_api/Runtime.h)"
echo "- createQwen3Session: $(grep -c 'createQwen3Session(' mllm/c_api/Runtime.h)"
echo "- createDeepseekOCRSession: $(grep -c 'createDeepseekOCRSession(' mllm/c_api/Runtime.h)"
echo "- freeSession: $(grep -c 'freeSession(' mllm/c_api/Runtime.h)"
echo "- insertSession: $(grep -c 'insertSession(' mllm/c_api/Runtime.h)"
echo "- sendRequest: $(grep -c 'sendRequest(' mllm/c_api/Runtime.h)"
echo "- pollResponse: $(grep -c 'pollResponse(' mllm/c_api/Runtime.h)"
echo "- freeResponseString: $(grep -c 'freeResponseString(' mllm/c_api/Runtime.h)"
echo "- MllmCAny: $(grep -c 'MllmCAny' mllm/c_api/Object.h)"Repository: UbiquitousLearning/mllm Length of output: 1672 The new header However, the file has trailing whitespace on 10 lines (69, 80, 81, 84, 95, 107, 115, 126, 134, 139), which violates the coding guideline requiring no trailing whitespace. Remove trailing spaces from these lines. 🤖 Prompt for AI Agents |
||
| #include <stdlib.h> | ||
|
|
||
| static void* MllmCAny_get_v_custom_ptr(MllmCAny handle) { | ||
|
|
@@ -142,4 +142,4 @@ func (s *Session) PollResponse(requestID string) string { | |
|
|
||
| func (s *Session) SessionID() string { | ||
| return s.sessionID | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,21 @@ | ||
| Tasks: | ||
| - ShellCommandTask: | ||
| command: | | ||
| echo "===== STEP 2: Setting up Go cross-compilation environment... =====" | ||
| export GOPROXY=https://goproxy.cn,direct | ||
| export GOOS=android | ||
| export GOARCH=arm64 | ||
| export CGO_ENABLED=1 | ||
| export ANDROID_NDK_HOME=/opt/ndk/android-ndk-r28b | ||
| export CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang | ||
| export CXX=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang++ | ||
|
|
||
| echo "===== STEP 3: Setting CGo linker and compiler flags... =====" | ||
| export CGO_LDFLAGS="-L/root/zty_workspace/mllm_zty/build-android-arm64-v8a/bin" | ||
| export CGO_CFLAGS="-I/root/zty_workspace/mllm_zty" | ||
|
|
||
| echo "===== STEP 4: Compiling Go MLLM WebSocket Client... =====" | ||
| cd mllm-cli && \ | ||
| echo "Running 'go mod tidy' to ensure all dependencies are present..." && \ | ||
| go mod tidy && \ | ||
| echo "Starting client build..." && \ | ||
| go build -o ../build-android-arm64-v8a/bin/mllm_ws_client -tags=mobile ./cmd/mllm-client/main.go | ||
| export GOPROXY=https://goproxy.cn,direct | ||
| export GOOS=android | ||
| export GOARCH=arm64 | ||
| export CGO_ENABLED=1 | ||
|
|
||
| export ANDROID_NDK_HOME=/opt/ndk/android-ndk-r28b | ||
| export CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang | ||
| export CXX=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang++ | ||
|
|
||
| export CGO_LDFLAGS="-L$(pwd)/build-android-arm64-v8a/bin -lMllmSdkC -lMllmRT -lMllmCPUBackend -llog" | ||
|
|
||
| export CGO_CFLAGS="-I$(pwd) -I/tmp/mllm_build" | ||
|
|
||
| cd mllm-cli && \ | ||
| echo "Running 'go mod tidy' to ensure all dependencies are present..." && \ | ||
| go mod tidy && \ | ||
| echo "Starting client build..." && \ | ||
| go build -o ../build-android-arm64-v8a/bin/mllm_ws_client -tags=mobile ./cmd/mllm-client/main.go |
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.
Clarify model list formatting.
The comma-separated list of models within a single code literal (
mllmTeam/Qwen3-0.6B-w4a32kai,mllmTeam/Qwen3-4B-w4a8-i8mm-kai) may confuse readers about whether this is a literal string to use somewhere or two separate supported models.Consider reformatting as separate bulleted items for clarity:
📝 Suggested formatting improvement
Or use "and" to separate:
📝 Committable suggestion
🤖 Prompt for AI Agents