ci: add RPM packaging for cortex and neuron
- cortex.spec: gateway binary, cortex.service systemd unit, cortex.toml + models.toml config files - neuron.spec: neuron binary, neuron.service systemd unit, neuron.toml config file - Parallel CI: srpm-cortex and srpm-neuron jobs build SRPMs concurrently, then publish to separate COPR repos (helexa/cortex and helexa/neuron) - Shared cortex user/group across both packages - Example configs: cortex.example.toml, neuron.example.toml, models.example.toml Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
35
cortex.spec
35
cortex.spec
@@ -1,7 +1,7 @@
|
||||
Name: cortex
|
||||
Version: 0.1.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Inference gateway for multi-node mistral.rs clusters
|
||||
Summary: Inference gateway for multi-node GPU clusters
|
||||
|
||||
License: GPL-3.0-or-later
|
||||
URL: https://git.lair.cafe/helexa/cortex
|
||||
@@ -15,11 +15,13 @@ BuildRequires: cargo
|
||||
BuildRequires: gcc
|
||||
BuildRequires: systemd-rpm-macros
|
||||
|
||||
Requires(pre): shadow-utils
|
||||
|
||||
%description
|
||||
Cortex is a Rust reverse-proxy that sits in front of multiple mistral.rs
|
||||
inference nodes and presents a unified OpenAI and Anthropic compatible
|
||||
API surface. It handles model routing, lifecycle management, request
|
||||
translation, and metrics collection.
|
||||
Cortex is a Rust reverse-proxy that sits in front of multiple inference
|
||||
nodes (via neuron daemons) and presents a unified OpenAI and Anthropic
|
||||
compatible API surface. It handles model routing, lifecycle management,
|
||||
request translation, and metrics collection.
|
||||
|
||||
%prep
|
||||
%autosetup
|
||||
@@ -38,12 +40,33 @@ cargo build --release -p cortex-cli
|
||||
|
||||
%install
|
||||
install -Dm755 target/release/cortex %{buildroot}%{_bindir}/cortex
|
||||
install -Dm644 data/cortex.service %{buildroot}%{_unitdir}/cortex.service
|
||||
install -dm750 %{buildroot}%{_sysconfdir}/cortex
|
||||
install -Dm640 cortex.example.toml %{buildroot}%{_sysconfdir}/cortex/cortex.toml
|
||||
install -Dm640 models.example.toml %{buildroot}%{_sysconfdir}/cortex/models.toml
|
||||
|
||||
%pre
|
||||
getent group cortex >/dev/null || groupadd -r cortex
|
||||
getent passwd cortex >/dev/null || useradd -r -g cortex -d /var/lib/cortex -s /sbin/nologin cortex
|
||||
|
||||
%post
|
||||
%systemd_post cortex.service
|
||||
|
||||
%preun
|
||||
%systemd_preun cortex.service
|
||||
|
||||
%postun
|
||||
%systemd_postun_with_restart cortex.service
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%{_bindir}/cortex
|
||||
%{_unitdir}/cortex.service
|
||||
%dir %attr(750,root,cortex) %{_sysconfdir}/cortex
|
||||
%config(noreplace) %attr(640,root,cortex) %{_sysconfdir}/cortex/cortex.toml
|
||||
%config(noreplace) %attr(640,root,cortex) %{_sysconfdir}/cortex/models.toml
|
||||
|
||||
%changelog
|
||||
* Mon Apr 14 2026 Rob Thijssen <grenade@rob.tn> - 0.1.0-1
|
||||
* Tue Apr 15 2026 Rob Thijssen <grenade@rob.tn> - 0.1.0-1
|
||||
- Initial package
|
||||
|
||||
Reference in New Issue
Block a user