fix kt-kernel installation issue (#1603)

* update README for kt-kernel for installation issues

* update install.sh

* update install.sh

* update install.sh

* update install.sh

* update install.sh

* update README

* fix sudo issue

* fix install issue

* fix import issue

* fix import issue

* update install.sh

* fix import issue

* fix import issue

* fix import issue

* update README

* update install

* update install
This commit is contained in:
Jiaqi Liao 2025-11-12 15:56:02 +08:00 committed by GitHub
parent 26b86aa96b
commit 02801c3c4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 332 additions and 32 deletions

View file

@ -31,16 +31,38 @@ git submodule update --init --recursive
### Quick Installation (Recommended)
The installation script automatically detects your CPU and configures optimal build settings:
Step 0: Create and activate a conda environment (recommended):
```bash
# Simple one-command installation (auto-detects CPU)
./install.sh
conda create -n kt-kernel python=3.11 -y
conda activate kt-kernel
```
The installation script will:
You can now install in two clear steps using the same script.
Option A: Two-step (explicit)
```bash
# 1) Install system prerequisites (cmake, hwloc, pkg-config)
./install.sh deps
# 2) Build and install kt-kernel (auto-detects CPU)
# By default, the script cleans the local ./build directory before compiling.
./install.sh build
```
Option B: One-step (deps + build)
```bash
# Simple one-command installation
./install.sh # same as: ./install.sh all
# Skip deps step if you already installed them
./install.sh all --skip-deps
```
The install script will:
- Auto-detect CPU capabilities (AMX support)
- Install `cmake` via conda (for the latest version)
- Install `cmake` via conda (if available)
- Install system dependencies (`libhwloc-dev`, `pkg-config`) based on your OS
**What gets configured automatically:**
@ -58,8 +80,8 @@ If you need specific build options (e.g., for LLAMAFILE backend, compatibility,
export CPUINFER_CPU_INSTRUCT=AVX512 # Options: NATIVE, AVX512, AVX2
export CPUINFER_ENABLE_AMX=OFF # Options: ON, OFF
# Run with manual mode
./install.sh --manual
# Run with manual mode (build only)
./install.sh build --manual
```
For advanced build options and binary distribution, see the [Build Configuration](#build-configuration) section. If you encounter issues, refer to [Error Troubleshooting](#error-troubleshooting).