fix
This commit is contained in:
parent
8a4e24ca20
commit
f73a6cfd5c
1 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
|||
use std::time::Duration;
|
||||
|
||||
use crate::{
|
||||
config::OllamaConfig,
|
||||
linux::{arch_chroot, systemd_service_enable},
|
||||
|
@ -19,11 +21,13 @@ pub fn setup_ollama(conf: &OllamaConfig) {
|
|||
|
||||
let mut ollama_server = std::process::Command::new("arch-chroot")
|
||||
.arg("/mnt")
|
||||
.arg("runuser -u ollama -- env OLLAMA_MODELS=/var/lib/ollama HOME=/var/lib/ollama /usr/bin/ollama serve")
|
||||
.arg("/bin/runuser -u ollama -- env OLLAMA_MODELS=/var/lib/ollama HOME=/var/lib/ollama /usr/bin/ollama serve")
|
||||
.stdout(std::process::Stdio::piped())
|
||||
.spawn()
|
||||
.expect("Failed to start ollama server");
|
||||
|
||||
std::thread::sleep(Duration::from_secs(5));
|
||||
|
||||
let models = conf.models.clone().unwrap_or_default();
|
||||
|
||||
for model in models {
|
||||
|
|
Loading…
Add table
Reference in a new issue