Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ deployment:
free disk. OpenBot needs 40 GB. Raise the disk limit in Docker Desktop > Settings > Resources, or
free space in Docker, then Retry.", and too few free CPUs or too little free memory say so the
same way. On Podman it names `podman machine set` instead. The CopilotKit account step now checks the engine first, and one
with fewer than 6 CPUs, less than 8 GB of memory or less than 40 GB of free disk stops there with
with fewer than 4 CPUs, less than 4 GB of memory or less than 40 GB of free disk stops there with
the same advice, before Start.
- When OpenBot Desktop is signed in with a model Learning can't use, Learn now in Settings →
Learning says "Learning can't run on the model you signed in with. To use it, sign OpenBot in with
Expand Down
42 changes: 31 additions & 11 deletions desktop/src-tauri/src/local_eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1166,16 +1166,16 @@ fn on_podman() -> bool {
const GIB: u64 = 1024 * 1024 * 1024;

/**
The smallest engine OpenBot asks for before local setup: 6 CPUs, 8 GB of memory and 40 GiB of free
disk.
The smallest engine OpenBot lets through before local setup: 4 CPUs, 4 GiB of memory and 40 GiB of
free disk.

The CLI's own check wants 4 free CPUs and 4 GiB of free memory inside a container, measured while
OpenBot's own containers run, so an engine of exactly that size fails it at Start. Memory is
compared at 7 GiB, since an engine set to 8 GB reports a little under 8 GiB. Free disk is the CLI's
own 40 GiB, measured as it measures it, inside a container.
The CLI's own check wants 4 free CPUs and 4 GiB of free memory inside a container, so an engine
below those totals can never pass it. Anything larger is left to the CLI at Start: OpenBot's own
Podman machine is 4 CPUs and 6 GiB and passes there, so a stricter total here would stop every
Podman install. Free disk is the CLI's own 40 GiB, measured as it measures it, inside a container.
*/
pub const MIN_ENGINE_CPUS: u64 = 6;
pub const MIN_ENGINE_MEMORY_BYTES: u64 = 7 * GIB;
pub const MIN_ENGINE_CPUS: u64 = 4;
pub const MIN_ENGINE_MEMORY_BYTES: u64 = 4 * GIB;
pub const MIN_ENGINE_FREE_DISK_BYTES: u64 = 40 * GIB;

/// What an engine of this size is short of for local setup. Free disk that could not be measured
Expand Down Expand Up @@ -6558,18 +6558,38 @@ fn main() {{
.is_none());
}

/// The onboarding check asks for 6 CPUs, 8 GB and 40 GiB of free disk, so an engine that would
/// fail the CLI's check at Start, with OpenBot's own containers running beside it, is caught
/// first. Free disk is measured as the CLI measures it, with `df -Pk /` in a container.
/// The onboarding check stops only an engine that can never pass the CLI's check at Start:
/// fewer than 4 CPUs, under 4 GiB of memory, or under 40 GiB of free disk. OpenBot's own
/// 4 CPU, 6 GiB Podman machine passes. Free disk is measured as the CLI measures it, with
/// `df -Pk /` in a container.
#[test]
fn a_small_or_full_engine_is_caught_before_local_setup() {
const GB: u64 = 1_000_000_000;
let roomy = Some(100 * GB);
// `docker info --format '{{.NCPU}} {{.MemTotal}}'` on Docker Desktop.
for (said, free, cpu, memory, disk) in [
// OpenBot's own Podman machine: 4 CPUs and 6144 MiB, as `podman info` reports it. The
// CLI's check passes on it, so this check must too.
(
"4 6262661120
",
roomy,
false,
false,
false,
),
// 4 CPUs and 8 GB, as Docker Desktop reports an 8 GB limit.
(
"4 8217473024
",
roomy,
false,
false,
false,
),
// Fewer than 4 CPUs can never leave the CLI 4 free ones.
(
"3 8217473024
",
roomy,
true,
Expand Down
2 changes: 1 addition & 1 deletion desktop/src/localReadiness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export function resourcesShortSaid(shortfall: Shortfall): string {
export function engineTooSmallSaid(shortfall: Shortfall): string {
return shortfallSaid(
shortfall,
{ cpu: "6 CPUs", memory: "8 GB of memory", disk: "40 GB free" },
{ cpu: "4 CPUs", memory: "4 GB of memory", disk: "40 GB free" },
"Try again",
);
}
Expand Down
Loading