-
Notifications
You must be signed in to change notification settings - Fork 6
feat(install): Add installer script Termux build support #3
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
Open
mcpe500
wants to merge
5
commits into
KolosalAI:main
Choose a base branch
from
mcpe500:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
df2fc24
feat(install): add unified installer script for Kolosal CLI on multip…
mcpe500 f2e98e7
build(kolosal-cli): add Termux build script for Kolosal CLI
mcpe500 e9c032f
chore(script): add run-kolosal.sh to execute Kolosal CLI from anywhere
mcpe500 805dc02
Fix various issues in installation and build scripts\n\n- Fix directo…
mcpe500 b340eb3
Merge branch 'main' into main
mcpe500 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| #!/data/data/com.termux/files/usr/bin/bash | ||
| # Build script for Kolosal CLI on Termux | ||
|
|
||
| set -e # Exit on any error | ||
|
|
||
| echo "Kolosal CLI Build Script for Termux" | ||
| echo "===================================" | ||
|
|
||
| # Check if we're in the right directory | ||
| if [ ! -f "CMakeLists.txt" ]; then | ||
| echo "Error: CMakeLists.txt not found. Please run this script from the kolosal-cli root directory." | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "Checking for required dependencies..." | ||
|
|
||
| # Check for required packages | ||
| for cmd in cmake make clang pkg-config; do | ||
| if ! command -v $cmd >/dev/null 2>&1; then | ||
| echo "Error: Required command '$cmd' not found." | ||
| echo "Please install it with: pkg install cmake make clang pkg-config -y" | ||
| exit 1 | ||
| fi | ||
| done | ||
|
|
||
| echo "All required dependencies found." | ||
|
|
||
| # Check for required libraries | ||
| echo "Checking for required libraries..." | ||
| for lib in libcurl openssl zlib; do | ||
| if ! pkg list-installed | grep -q "^$lib"; then | ||
| echo "Warning: Library '$lib' not found. Installing..." | ||
| pkg install $lib -y | ||
| fi | ||
| done | ||
|
|
||
| echo "All required libraries are available." | ||
|
|
||
| # Initialize and update main submodules if needed | ||
| echo "Initializing and updating submodules..." | ||
| if [ ! -d "kolosal-server" ] || [ ! -f "kolosal-server/.git" ]; then | ||
mcpe500 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| echo "Initializing main submodules..." | ||
| git submodule init | ||
| git submodule update | ||
| fi | ||
|
|
||
| # Check if kolosal-server/.gitmodules exists and initialize its submodules | ||
| if [ -f "kolosal-server/.gitmodules" ]; then | ||
| echo "Initializing kolosal-server submodules..." | ||
| cd kolosal-server | ||
| git submodule init | ||
| git submodule update | ||
| cd .. | ||
| else | ||
| echo "Warning: kolosal-server/.gitmodules not found. This might cause build issues." | ||
| fi | ||
|
|
||
| # Create build directory if it doesn't exist | ||
| echo "Setting up build directory..." | ||
| mkdir -p build | ||
| cd build | ||
|
|
||
| # Configure with CMake | ||
| echo "Configuring with CMake..." | ||
| cmake .. -DCMAKE_BUILD_TYPE=Release | ||
|
|
||
| # Build the project | ||
| echo "Building Kolosal CLI (this may take a while)..." | ||
| make -j4 | ||
|
|
||
| # Check if build was successful | ||
| if [ ! -f "bin/kolosal" ]; then | ||
| echo "Error: Build failed. kolosal executable not found in build/bin/" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "" | ||
| echo "Build successful!" | ||
| echo "================" | ||
| echo "Kolosal CLI has been built successfully." | ||
| echo "" | ||
| echo "To run directly:" | ||
| echo " ./bin/kolosal" | ||
| echo "" | ||
| echo "To install globally (so you can run 'kolosal' from anywhere):" | ||
| echo " cd .. && ./install-kolosal-termux.sh" | ||
| echo "" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.