feat: switch from deprecated mistralrs-server to mistralrs CLI
Build the mistralrs binary (CLI) instead of the deprecated mistralrs-server. The RPM still installs as /usr/bin/mistralrs-server for backwards compatibility. The systemd unit now invokes `mistralrs-server serve` to use the CLI's serve subcommand. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -44,7 +44,7 @@ jobs:
|
||||
git clone --depth 1 --branch "${{ inputs.tag }}" \
|
||||
https://github.com/EricLBuehler/mistral.rs.git src/
|
||||
|
||||
- name: Build mistralrs-server
|
||||
- name: Build mistralrs
|
||||
run: |
|
||||
export PATH="${{ matrix.cuda_home }}/bin:${PATH}"
|
||||
export LD_LIBRARY_PATH="${{ matrix.cuda_home }}/targets/x86_64-linux/lib:${{ matrix.cuda_home }}/lib64:${LD_LIBRARY_PATH:-}"
|
||||
@@ -59,14 +59,14 @@ jobs:
|
||||
- name: Collect artifacts
|
||||
run: |
|
||||
mkdir --parents artifacts
|
||||
cp src/target/release/mistralrs-server "artifacts/mistralrs-server-${{ matrix.name }}"
|
||||
echo "built: $(artifacts/mistralrs-server-${{ matrix.name }} --version 2>&1 | head -1)"
|
||||
cp src/target/release/mistralrs "artifacts/mistralrs-${{ matrix.name }}"
|
||||
echo "built: $(artifacts/mistralrs-${{ matrix.name }} --version 2>&1 | head -1)"
|
||||
|
||||
- name: Upload binary artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: mistralrs-server-${{ matrix.name }}-fc${{ matrix.fedora_version }}
|
||||
path: artifacts/mistralrs-server-${{ matrix.name }}
|
||||
name: mistralrs-${{ matrix.name }}-fc${{ matrix.fedora_version }}
|
||||
path: artifacts/mistralrs-${{ matrix.name }}
|
||||
retention-days: 1
|
||||
|
||||
package:
|
||||
@@ -84,7 +84,7 @@ jobs:
|
||||
- name: Download binary
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: mistralrs-server-${{ matrix.name }}-fc${{ matrix.fedora_version }}
|
||||
name: mistralrs-${{ matrix.name }}-fc${{ matrix.fedora_version }}
|
||||
path: artifacts/
|
||||
|
||||
- name: Determine version
|
||||
@@ -105,7 +105,7 @@ jobs:
|
||||
run: |
|
||||
rm -f ~/.rpmmacros
|
||||
rpmdev-setuptree
|
||||
cp artifacts/mistralrs-server-${{ matrix.name }} ~/rpmbuild/SOURCES/
|
||||
cp artifacts/mistralrs-${{ matrix.name }} ~/rpmbuild/SOURCES/
|
||||
cp rpm/systemd/mistralrs@.service ~/rpmbuild/SOURCES/
|
||||
cp rpm/systemd/mistralrs@.conf.example ~/rpmbuild/SOURCES/
|
||||
rpmbuild -bb rpm/mistralrs.spec \
|
||||
|
||||
@@ -15,7 +15,7 @@ License: MIT
|
||||
URL: https://github.com/EricLBuehler/mistral.rs
|
||||
|
||||
# Pre-built binary (produced in the build job, not rebuilt here)
|
||||
Source0: mistralrs-server-%{mistralrs_flavour}
|
||||
Source0: mistralrs-%{mistralrs_flavour}
|
||||
Source1: mistralrs@.service
|
||||
Source2: mistralrs@.conf.example
|
||||
|
||||
@@ -45,7 +45,7 @@ cp %{SOURCE2} .
|
||||
# Already built
|
||||
|
||||
%install
|
||||
install -D -m 0755 mistralrs-server-%{mistralrs_flavour} \
|
||||
install -D -m 0755 mistralrs-%{mistralrs_flavour} \
|
||||
%{buildroot}%{_bindir}/mistralrs-server
|
||||
install -D -m 0644 mistralrs@.service \
|
||||
%{buildroot}%{_unitdir}/mistralrs@.service
|
||||
|
||||
@@ -9,7 +9,7 @@ User=mistralrs
|
||||
Group=mistralrs
|
||||
SupplementaryGroups=video render
|
||||
EnvironmentFile=/etc/mistralrs/%i.conf
|
||||
ExecStart=@BINARY@ $MISTRALRS_ARGS
|
||||
ExecStart=@BINARY@ serve $MISTRALRS_ARGS
|
||||
Restart=on-failure
|
||||
RestartSec=10s
|
||||
|
||||
|
||||
Reference in New Issue
Block a user