2.4 KiB
2.4 KiB
BitNet s9pk Package
StartOS package for BitNet LLM with SSH access.
Project Structure
bitnet-s9pk/
├── Dockerfile # Extended BitNet image with SSH
├── docker_entrypoint.sh # Entrypoint script for SSH setup
├── manifest.yaml # StartOS package manifest
├── instructions.md # User-facing instructions
├── Makefile # Build automation
├── scripts/
│ ├── config_get.sh # Config schema
│ ├── config_set.sh # Config application
│ ├── properties.sh # Package properties
│ └── health_check.sh # Health check script
└── assets/
└── icon.png # Package icon (TODO)
Prerequisites
- Docker access (local or remote via SSH to MacBook)
start-cliinstalled and authenticated- Developer key at
/data/.startos/developer.key.pem
Building
Option 1: Using Makefile (Recommended)
cd /data/.openclaw/workspace/bitnet-s9pk
make
This will:
- Build the Docker image on remote Docker (MacBook)
- Export it as
image.tar - Pack everything into
bitnet.s9pk
Option 2: Manual Build
# Build image on MacBook
docker -H ssh://macbook build --platform linux/amd64 \
--tag start9/bitnet/main:1.0.0 \
-o type=docker,dest=image.tar .
# Pack the s9pk
start-cli s9pk pack --arch aarch64 --arch x86_64 .
Installing
# Install on your StartOS server
start-cli package install bitnet.s9pk
# Or use make
make install
Configuration After Install
- Go to BitNet service in StartOS UI
- Navigate to Config tab
- Paste your SSH public key
- Save and restart the service
Connecting via SSH
# Via Tor (get address from Interfaces tab)
ssh -o ProxyCommand="nc -x localhost:9050 %h %p" root@your-bitnet-address.onion
# Via LAN
ssh root@your-server-lan-ip -p <port>
Using BitNet
Once connected:
# Run inference
python3 /BitNet/run_inference.py -m ggml-model-i2_s.gguf -p "Hello, world!"
# See help
python3 /BitNet/run_inference.py --help
TODO
- Add proper icon.png (512x512)
- Test on actual StartOS hardware
- Add model download action
- Volume mount for custom models
References
- BitNet: https://github.com/microsoft/BitNet
- Container: https://github.com/kth8/bitnet
- StartOS Docs: https://docs.start9.com/latest/developer-docs/