Skip to content

Commit 34435c4

Browse files
Add install script and GitHub release workflow
- install.sh: curl-able installer that pulls binary from GitHub releases - release.yml: builds musl static binaries (x86_64 + aarch64) on tag push - Update README install section to use install script No PyPI needed — binary from releases, Python SDK from git. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c43db5e commit 34435c4

3 files changed

Lines changed: 152 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags: ["v*"]
6+
7+
permissions:
8+
contents: write
9+
10+
env:
11+
CARGO_TERM_COLOR: always
12+
13+
jobs:
14+
build:
15+
name: Build ${{ matrix.target }}
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
include:
20+
- target: x86_64-unknown-linux-musl
21+
binary: zerostart-linux-x86_64
22+
- target: aarch64-unknown-linux-musl
23+
binary: zerostart-linux-aarch64
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- uses: dtolnay/rust-toolchain@stable
28+
with:
29+
targets: ${{ matrix.target }}
30+
31+
- uses: Swatinem/rust-cache@v2
32+
with:
33+
workspaces: crates
34+
35+
- name: Install cross-compilation tools
36+
run: cargo install cargo-zigbuild && pip3 install ziglang
37+
38+
- name: Build
39+
run: cd crates && cargo zigbuild --target ${{ matrix.target }} --release -p zs-fast-wheel
40+
41+
- name: Package binary
42+
run: |
43+
cp crates/target/${{ matrix.target }}/release/zerostart ${{ matrix.binary }}
44+
chmod +x ${{ matrix.binary }}
45+
46+
- uses: actions/upload-artifact@v4
47+
with:
48+
name: ${{ matrix.binary }}
49+
path: ${{ matrix.binary }}
50+
51+
release:
52+
name: Create Release
53+
needs: build
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v4
57+
58+
- uses: actions/download-artifact@v4
59+
with:
60+
path: artifacts
61+
62+
- name: Create release
63+
env:
64+
GH_TOKEN: ${{ github.token }}
65+
run: |
66+
gh release create ${{ github.ref_name }} \
67+
--title "zerostart ${{ github.ref_name }}" \
68+
--generate-notes \
69+
artifacts/zerostart-linux-x86_64/zerostart-linux-x86_64 \
70+
artifacts/zerostart-linux-aarch64/zerostart-linux-aarch64

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,18 @@ CUDA libraries (nvidia-cublas, nvidia-cudnn, nvidia-nccl, etc.) are ~6GB and ide
8181
## Install
8282

8383
```bash
84-
# Rust binary (fast wheel installation + streaming)
84+
curl -fsSL https://raw.githubusercontent.com/gpu-cli/zerostart/main/install.sh | sh
85+
```
86+
87+
Or manually:
88+
89+
```bash
90+
# Binary only
8591
curl -fsSL https://github.com/gpu-cli/zerostart/releases/latest/download/zerostart-linux-x86_64 \
8692
-o /usr/local/bin/zerostart && chmod +x /usr/local/bin/zerostart
8793

88-
# Python SDK (model acceleration, integrations)
89-
pip install zerostart
94+
# Python SDK (for accelerate(), vLLM integration)
95+
pip install git+https://github.com/gpu-cli/zerostart.git#subdirectory=python
9096
```
9197

9298
Requires Linux + Python 3.10+ + `uv` (pre-installed on most GPU containers).

install.sh

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
#!/bin/sh
2+
# Install zerostart from GitHub releases.
3+
#
4+
# Usage:
5+
# curl -fsSL https://raw.githubusercontent.com/gpu-cli/zerostart/main/install.sh | sh
6+
#
7+
# Options (via env vars):
8+
# INSTALL_DIR=/usr/local/bin Where to put the binary (default: /usr/local/bin)
9+
# VERSION=v0.1.0 Specific version (default: latest)
10+
11+
set -eu
12+
13+
REPO="gpu-cli/zerostart"
14+
INSTALL_DIR="${INSTALL_DIR:-/usr/local/bin}"
15+
16+
# Detect platform
17+
OS="$(uname -s)"
18+
ARCH="$(uname -m)"
19+
20+
case "$OS" in
21+
Linux) ;;
22+
*) echo "Error: zerostart only supports Linux (got $OS)." >&2; exit 1 ;;
23+
esac
24+
25+
case "$ARCH" in
26+
x86_64|amd64) ARCH="x86_64" ;;
27+
aarch64|arm64) ARCH="aarch64" ;;
28+
*) echo "Error: unsupported architecture $ARCH." >&2; exit 1 ;;
29+
esac
30+
31+
BINARY="zerostart-linux-${ARCH}"
32+
33+
# Resolve version
34+
if [ -z "${VERSION:-}" ]; then
35+
VERSION="$(curl -fsSL "https://api.github.com/repos/${REPO}/releases/latest" | grep '"tag_name"' | head -1 | sed 's/.*"tag_name": *"//;s/".*//')"
36+
if [ -z "$VERSION" ]; then
37+
echo "Error: could not determine latest version." >&2
38+
exit 1
39+
fi
40+
fi
41+
42+
URL="https://github.com/${REPO}/releases/download/${VERSION}/${BINARY}"
43+
44+
echo "Installing zerostart ${VERSION} (${ARCH})..."
45+
46+
# Download
47+
if command -v curl >/dev/null 2>&1; then
48+
curl -fsSL "$URL" -o "/tmp/${BINARY}"
49+
elif command -v wget >/dev/null 2>&1; then
50+
wget -q "$URL" -O "/tmp/${BINARY}"
51+
else
52+
echo "Error: curl or wget required." >&2
53+
exit 1
54+
fi
55+
56+
# Install
57+
chmod +x "/tmp/${BINARY}"
58+
if [ -w "$INSTALL_DIR" ]; then
59+
mv "/tmp/${BINARY}" "${INSTALL_DIR}/zerostart"
60+
else
61+
sudo mv "/tmp/${BINARY}" "${INSTALL_DIR}/zerostart"
62+
fi
63+
64+
echo "Installed zerostart to ${INSTALL_DIR}/zerostart"
65+
echo ""
66+
echo " zerostart run -p torch serve.py"
67+
echo ""
68+
69+
# Optional: install Python SDK
70+
if command -v pip >/dev/null 2>&1; then
71+
echo "To install the Python SDK (accelerate(), vLLM integration):"
72+
echo " pip install git+https://github.com/${REPO}.git#subdirectory=python"
73+
fi

0 commit comments

Comments
 (0)