All checks were successful
poll-upstream / check (push) Successful in 1s
Replace the monolithic publish-repo.sh with discrete workflow steps: Sign RPMs, Set up SSH, Sync RPMs to repo, Update repo metadata. Each step now has its own name in the CI UI, making failures immediately identifiable. Removed 2>/dev/null from ssh-keyscan which was silently hiding DNS resolution failures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3.0 KiB
3.0 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Purpose
This repo packages mistral.rs (a Rust LLM inference server) into RPMs for Fedora 43 / x86_64. It does not contain the mistral.rs source — it clones upstream at a given tag, cross-compiles with CUDA, and produces signed RPMs published to a self-hosted dnf repo at rpm.lair.cafe.
Architecture
Pipeline flow
- 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 onrpm.lair.cafe, triggersbuild-release. - 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.0runner. Clones upstream at tag, callsscript/build-binary.shtocargo build --release --lockedwith flavour-specific CUDA features. - package — runs
rpmbuild -bb rpm/mistralrs.specwith--definefor version and flavour. - publish — GPG-signs RPMs, rsyncs to
rpm.lair.cafe, runscreaterepo_c --update. Uses concurrency grouprpm-publishto prevent metadata races.
- plan — reads
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.
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 instancesscript/build-binary.sh— compiles mistralrs-server with cargo (requiresFLAVOUR_NAME,CUDA_HOME,CARGO_FEATURES,CUDA_COMPUTE_CAP,SRC_DIRenv vars)script/setup/— one-time infra setup scripts (DNS, TLS cert, nginx, GPG) forrpm.lair.cafeon hostoolon
Commands
Build a binary locally (requires CUDA toolkit):
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:
rpmdev-setuptree
cp artifacts/mistralrs-server-cuda13 ~/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"
Infrastructure
- CI runs on Gitea Actions (self-hosted), not GitHub Actions
- RPM repo hosted at
rpm.lair.cafeon hostoolon.kosherinata.internal - TLS via Let's Encrypt with Cloudflare DNS challenge
- Publish uses rsync over SSH as
gitea_ciuser