docs: update readme and CLAUDE.md for per-GPU flavours and prerelease

Replace cuda13 references with ampere/ada/blackwell flavours, add
unstable repo client setup instructions, remove obsolete nvm runner
prerequisites and flavours.yml references.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-11 14:48:39 +03:00
parent ace6037a2d
commit 0d6f48fcc0
2 changed files with 52 additions and 42 deletions

View File

@@ -10,20 +10,25 @@ This repo packages [mistral.rs](https://github.com/EricLBuehler/mistral.rs) (a R
### Pipeline flow
1. **poll-upstream** (`.gitea/workflows/poll-upstream.yml`) — cron every 15 min, checks GitHub for latest mistral.rs release tag. If the corresponding RPM doesn't exist on `rpm.lair.cafe`, triggers `build-release`.
1. **poll-upstream** (`.gitea/workflows/poll-upstream.yml`) — cron every 15 min, checks GitHub for latest mistral.rs release tag. If the corresponding RPMs don't exist on `rpm.lair.cafe`, triggers `build-release`. Also checks upstream `main` branch HEAD and triggers `build-prerelease` for the unstable repo.
2. **build-release** (`.gitea/workflows/build-release.yml`) — three-stage pipeline:
- **plan** — reads `flavours.yml`, emits a JSON matrix of flavours + stripped version.
- **build** — runs on a `cuda-13.0` runner. Clones upstream at tag, calls `script/build-binary.sh` to `cargo build --release --locked` with flavour-specific CUDA features.
- **build** — runs on a `cuda-13.0` runner. Clones upstream at tag, runs `cargo build --release --locked` with flavour-specific CUDA features.
- **package** — runs `rpmbuild -bb rpm/mistralrs.spec` with `--define` for version and flavour.
- **publish** — GPG-signs RPMs, rsyncs to `rpm.lair.cafe`, runs `createrepo_c --update`. Uses concurrency group `rpm-publish` to prevent metadata races.
3. **build-prerelease** (`.gitea/workflows/build-prerelease.yml`) — same structure as build-release but clones at a specific commit from `main`, omits `--locked`, uses prerelease release suffix, and publishes to the unstable repo at `rpm.lair.cafe/fedora/$releasever/$basearch/unstable/`.
### Flavours
Defined in `flavours.yml`. Each flavour specifies a name, `cuda_home`, `cargo_features`, and `compute_caps`. The RPM spec uses `update-alternatives` so multiple flavours can coexist, with priority: base=10, fa=20, nccl=30.
Defined in the workflow matrix. Each flavour targets a specific GPU generation using the same CUDA 13.0 toolkit and features (cuda, cudnn, flash-attn, nccl), varying only the compute capability.
| Flavour | Compute cap | GPU generation |
|------------|-------------|---------------------------|
| ampere | sm_86 | RTX 3060, A2000A6000 |
| ada | sm_89 | RTX 40604090, L40 |
| blackwell | sm_120 | RTX 5090, B100, B200 |
### Key files
- `flavours.yml` — flavour matrix definition (drives CI matrix)
- `rpm/mistralrs.spec` — RPM spec (binary-only package, no rebuild)
- `rpm/systemd/mistralrs@.service` — templated systemd unit (`@BINARY@` and `@FLAVOUR@` are sed-replaced during rpmbuild)
- `rpm/systemd/mistralrs@.conf.example` — example env file for instances
@@ -31,23 +36,20 @@ Defined in `flavours.yml`. Each flavour specifies a name, `cuda_home`, `cargo_fe
## Commands
Build a binary locally (requires CUDA toolkit):
```bash
FLAVOUR_NAME=cuda13 CUDA_HOME=/usr/local/cuda-13.0 CARGO_FEATURES="cuda cudnn flash-attn nccl" CUDA_COMPUTE_CAP=120 SRC_DIR=./src ./script/build-binary.sh
```
Build an RPM from a pre-built binary:
```bash
rpmdev-setuptree
cp artifacts/mistralrs-cuda13 ~/rpmbuild/SOURCES/
cp artifacts/mistralrs-ada ~/rpmbuild/SOURCES/
cp rpm/systemd/mistralrs@.service ~/rpmbuild/SOURCES/
cp rpm/systemd/mistralrs@.conf.example ~/rpmbuild/SOURCES/
rpmbuild -bb rpm/mistralrs.spec --define "mistralrs_version 0.7.0" --define "mistralrs_flavour cuda13"
rpmbuild -bb rpm/mistralrs.spec --define "mistralrs_version 0.8.0" --define "mistralrs_flavour ada"
```
## Infrastructure
- CI runs on Gitea Actions (self-hosted), not GitHub Actions
- RPM repo hosted at `rpm.lair.cafe` on host `oolon.kosherinata.internal`
- Stable repo: `rpm.lair.cafe/fedora/$releasever/$basearch/`
- Unstable repo: `rpm.lair.cafe/fedora/$releasever/$basearch/unstable/`
- TLS via Let's Encrypt with Cloudflare DNS challenge
- Publish uses rsync over SSH as `gitea_ci` user