MorpheusAIs / Morpheus

Morpheus - A Network For Powering Smart Agents - Compute + Code + Capital + Community
https://mor.org/
MIT License
177 stars 143 forks source link

Problem opening app if ollama is installed and running (macOS) #662

Open quertc opened 3 months ago

quertc commented 3 months ago

Version: 0.0.5

How to reproduce:

Expected behavior:

OR

Add ollama conflict error message

betterbrand commented 3 months ago

Hi @quertc Are you running this on an Intel or M chipset?

quertc commented 3 months ago

Hi @quertc Are you running this on an Intel or M chipset?

M

betterbrand commented 3 months ago

Ollama may have updated to it's 1.0 version in during the time between 0.0.5 and 0.0.6. Which version of Ollama are you running?

quertc commented 2 months ago

Ollama may have updated to it's 1.0 version in during the time between 0.0.5 and 0.0.6. Which version of Ollama are you running?

Latest (0.1.32). It doesn't update, it just downloads a new binary. And downloads the models to another folder (chatd).

And version 0.0.6 is the Lite Client, not this Morpheus repo. Lite Client works differently with ollama.

devhakeo commented 2 months ago

const fs = require('fs'); const { exec } = require('child_process');

function initializeMorpheus() { checkOllamaExists().then(exists => { if (exists) { verifyAndInstallModel(); } else { installOllama().then(installModel); } }); }

function checkOllamaExists() { return new Promise(resolve => { fs.exists('/Applications/Ollama.app', exists => { resolve(exists); }); }); }

function verifyAndInstallModel() { // Implement verification logic and model installation if Ollama exists console.log('Verifying and installing model...'); }

function installOllama() { return new Promise((resolve, reject) => { console.log('Installing Ollama...'); exec('brew install ollama', (error, stdout, stderr) => { if (error) { console.error(Error installing Ollama: ${error}); return reject(error); } console.log('Ollama installed successfully'); resolve(); }); }); }

function installModel() { // Code to install the model via Ollama console.log('Installing model...'); }

initializeMorpheus();

devhakeo commented 2 months ago

This script uses Node.js to check for the presence of Ollama.app, installs it if not present, and ensures that the model is installed or verified accordingly. Adjust the paths and installation commands as needed for your specific setup.