Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
quertc opened this issue Apr 18, 2024 · 6 comments
Open

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

quertc opened this issue Apr 18, 2024 · 6 comments

Comments

@quertc
Copy link

quertc commented Apr 18, 2024

Version: 0.0.5

How to reproduce:

  • Turn off Ollama.app in the system
  • Open morpheus.app (it will install a new ollama-darwin bin and model in a new folder)
  • Close morpheus.app and enable our Ollama.app
  • Open morpheus.app again and see the eternal loading

Expected behavior:

  • Check if Ollama.app exists on the system
    • If yes install & verify the model through it
    • If not, install ollama and use it

OR

Add ollama conflict error message

@betterbrand
Copy link
Collaborator

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

@quertc
Copy link
Author

quertc commented Apr 20, 2024

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

M

@betterbrand
Copy link
Collaborator

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
Copy link
Author

quertc commented Apr 21, 2024

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
Copy link

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants