refactor: rename cortex-neuron binary and crate to neuron
Package name, lib name, and binary all now just "neuron" without the cortex- prefix. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
12
CLAUDE.md
12
CLAUDE.md
@@ -547,7 +547,7 @@ branch → PR. CI (fmt, clippy, test) must pass before merge.
|
|||||||
### Phase 7: neuron scaffold and discovery ✅
|
### Phase 7: neuron scaffold and discovery ✅
|
||||||
|
|
||||||
Completed. Deleted `cortex-agent`, created `crates/neuron/` (binary:
|
Completed. Deleted `cortex-agent`, created `crates/neuron/` (binary:
|
||||||
`cortex-neuron`). Added shared types to cortex-core: `discovery.rs`
|
`neuron`). Added shared types to cortex-core: `discovery.rs`
|
||||||
(DeviceInfo, DiscoveryResponse, DeviceHealth, HealthResponse) and
|
(DeviceInfo, DiscoveryResponse, DeviceHealth, HealthResponse) and
|
||||||
`harness.rs` (Harness async trait, HarnessConfig, ModelSpec, ModelInfo).
|
`harness.rs` (Harness async trait, HarnessConfig, ModelSpec, ModelInfo).
|
||||||
|
|
||||||
@@ -598,7 +598,7 @@ grenade COPR repo.
|
|||||||
**Steps:**
|
**Steps:**
|
||||||
1. `neuron.spec` — RPM spec file for the neuron binary. Install to
|
1. `neuron.spec` — RPM spec file for the neuron binary. Install to
|
||||||
`/usr/libexec/cortex/neuron`. Systemd unit
|
`/usr/libexec/cortex/neuron`. Systemd unit
|
||||||
`cortex-neuron.service`. Config at `/etc/cortex/neuron.toml`.
|
`neuron.service`. Config at `/etc/cortex/neuron.toml`.
|
||||||
2. Update `cortex.spec` — ensure the cortex binary, config, and
|
2. Update `cortex.spec` — ensure the cortex binary, config, and
|
||||||
`models.toml` are packaged correctly.
|
`models.toml` are packaged correctly.
|
||||||
3. Gitea Actions CI job: on tag push, build SRPM, submit to COPR.
|
3. Gitea Actions CI job: on tag push, build SRPM, submit to COPR.
|
||||||
@@ -608,12 +608,12 @@ grenade COPR repo.
|
|||||||
# on the gateway host:
|
# on the gateway host:
|
||||||
dnf install cortex
|
dnf install cortex
|
||||||
# on each GPU node:
|
# on each GPU node:
|
||||||
dnf install cortex-neuron
|
dnf install neuron
|
||||||
```
|
```
|
||||||
|
|
||||||
**Done when:** `dnf install cortex-neuron` on a Fedora 43 host drops
|
**Done when:** `dnf install neuron` on a Fedora 43 host drops the
|
||||||
the binary, config, and systemd unit. `systemctl start cortex-neuron`
|
binary, config, and systemd unit. `systemctl start neuron` runs
|
||||||
runs discovery and serves `/discovery`.
|
discovery and serves `/discovery`.
|
||||||
|
|
||||||
### Phase 11: llama.cpp harness stub
|
### Phase 11: llama.cpp harness stub
|
||||||
|
|
||||||
|
|||||||
38
Cargo.lock
generated
38
Cargo.lock
generated
@@ -404,25 +404,6 @@ dependencies = [
|
|||||||
"urlencoding",
|
"urlencoding",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "cortex-neuron"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"anyhow",
|
|
||||||
"async-trait",
|
|
||||||
"axum",
|
|
||||||
"clap",
|
|
||||||
"cortex-core",
|
|
||||||
"figment",
|
|
||||||
"reqwest",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"tokio",
|
|
||||||
"toml",
|
|
||||||
"tracing",
|
|
||||||
"tracing-subscriber",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "crossbeam-epoch"
|
name = "crossbeam-epoch"
|
||||||
version = "0.9.18"
|
version = "0.9.18"
|
||||||
@@ -1201,6 +1182,25 @@ dependencies = [
|
|||||||
"tempfile",
|
"tempfile",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "neuron"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"async-trait",
|
||||||
|
"axum",
|
||||||
|
"clap",
|
||||||
|
"cortex-core",
|
||||||
|
"figment",
|
||||||
|
"reqwest",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"tokio",
|
||||||
|
"toml",
|
||||||
|
"tracing",
|
||||||
|
"tracing-subscriber",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nom"
|
name = "nom"
|
||||||
version = "7.1.3"
|
version = "7.1.3"
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cortex-neuron"
|
name = "neuron"
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "cortex_neuron"
|
name = "neuron"
|
||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "cortex-neuron"
|
name = "neuron"
|
||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
use cortex_neuron::{api, config::NeuronConfig, discovery, harness::HarnessRegistry, health};
|
use neuron::{api, config::NeuronConfig, discovery, harness::HarnessRegistry, health};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::Instant;
|
use std::time::Instant;
|
||||||
use tokio::sync::RwLock;
|
use tokio::sync::RwLock;
|
||||||
use tracing_subscriber::EnvFilter;
|
use tracing_subscriber::EnvFilter;
|
||||||
|
|
||||||
#[derive(Parser)]
|
#[derive(Parser)]
|
||||||
#[command(name = "cortex-neuron")]
|
#[command(name = "neuron")]
|
||||||
#[command(about = "Per-node daemon for cortex inference clusters")]
|
#[command(about = "Per-node daemon for cortex inference clusters")]
|
||||||
#[command(version)]
|
#[command(version)]
|
||||||
struct Args {
|
struct Args {
|
||||||
@@ -25,7 +25,7 @@ async fn main() -> Result<()> {
|
|||||||
tracing_subscriber::fmt()
|
tracing_subscriber::fmt()
|
||||||
.with_env_filter(
|
.with_env_filter(
|
||||||
EnvFilter::try_from_default_env()
|
EnvFilter::try_from_default_env()
|
||||||
.unwrap_or_else(|_| EnvFilter::new("info,cortex_neuron=debug")),
|
.unwrap_or_else(|_| EnvFilter::new("info,neuron=debug")),
|
||||||
)
|
)
|
||||||
.init();
|
.init();
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ async fn main() -> Result<()> {
|
|||||||
|
|
||||||
let app = api::neuron_routes().with_state(state);
|
let app = api::neuron_routes().with_state(state);
|
||||||
let addr: std::net::SocketAddr = format!("0.0.0.0:{port}").parse()?;
|
let addr: std::net::SocketAddr = format!("0.0.0.0:{port}").parse()?;
|
||||||
tracing::info!("cortex-neuron listening on {addr}");
|
tracing::info!("neuron listening on {addr}");
|
||||||
let listener = tokio::net::TcpListener::bind(addr).await?;
|
let listener = tokio::net::TcpListener::bind(addr).await?;
|
||||||
axum::serve(listener, app).await?;
|
axum::serve(listener, app).await?;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
use cortex_core::discovery::{DeviceInfo, DiscoveryResponse};
|
use cortex_core::discovery::{DeviceInfo, DiscoveryResponse};
|
||||||
use cortex_neuron::api::{self, NeuronState};
|
use neuron::api::{self, NeuronState};
|
||||||
use cortex_neuron::harness::HarnessRegistry;
|
use neuron::harness::HarnessRegistry;
|
||||||
use cortex_neuron::health::HealthCache;
|
use neuron::health::HealthCache;
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use tokio::sync::RwLock;
|
use tokio::sync::RwLock;
|
||||||
|
|||||||
Reference in New Issue
Block a user