[slint] Re: ollama installation on Slint

  • From: Didier Spaier <didier@xxxxxxxx>
  • To: slint@xxxxxxxxxxxxx
  • Date: Mon, 4 Mar 2024 18:12:43 +0100

Hi,

The script /etc/rc.d/rc.ollama_startup.sh should be executed by
/etc/rc.d/rc.local including in it a code snippet like:

if [ -x /etc/rc.d/rc.local ]; then
  /etc/rc.d/rc.ollama_startup.sh start
fi

And the scripts /etc/rc.d/rc.local and /etc/rc.d/rc.ollama_startup.sh should
both be executable.

Also it is also customary that the daemon manager can start, stop the daemon and
also output its status (running or not) upon request, for this you will need to
write corresponding functions, see examples in /etc/rc.d.

Bur first, can you start ollama manually and have it working? If not, there is
no point writing a script to manage the daemon...

Cheers,
Didier

Le 04/03/2024 à 20:21, ploba60@xxxxxxxxx a écrit :

Hi,
Please confirm/correct me.

To create ollama startup script, is it good enough to do this:

nano /etc/rc.d/rc.ollama_startup.sh

#!/bin/bash

# Change directory to where Ollama is installed
cd /usr/local/bin/ollama

# Run Ollama Serve
./ollama serve

After saving this file run:

chmod +x /etc/rc.d/rc.ollama-startup.sh
Now, will the script run automatically at system startup, launching Ollama 
Serve in the background? I don't think so, it would be too easy.
Thank you for your assistance.
Pawel

-----Original Message-----
From: Didier Spaier <didier@xxxxxxxx> 
Sent: Friday, January 26, 2024 12:04 PM
To: ploba60@xxxxxxxxx
Subject: Re: [slint] ollama installation on Slint

Hello,

Yes. Or just:
wget https://ollama.ai/install.sh
Then (as root or using sudo):
sh install.sh
This way you can, have a look at this script before running it.

I did. Although the shebang be:
#!/bin/sh
it is  actually a bash script: as noticed by shellcheck:
In POSIX sh, 'local' is undefined.
But as in Slint /bin/sh is a symlink to /bin/bash

I didn't check the script otherwise, but it worked here (with caveats as I do 
not have  NVIDA gpu).

Didier

Le 1/26/24 à 16:31, ploba60@xxxxxxxxx a écrit :
Hello,

Would you mind sharing your thoughts regarding the ollama installation on 
Slint:

 

https://ollama.ai/download/linux ;<https://ollama.ai/download/linux>

 

After reading their “manual install instructions” I am not sure that I 
can run their install with one command:

curl https://ollama.ai/install.sh ;<https://ollama.ai/install.sh> | sh

Is it going to run on Slint?

Thanks,

Pawel


============================================================================The
 Slint mailing list.
Archive: https://www.freelists.org/archive/slint
To subscribe or unsubscribe, email slint-request@xxxxxxxxxxxxx with the 
subject
'subscribe' or 'unsubscribe', then answer the email you will receive.
More: email slint-request@xxxxxxxxxxxxx with as subject 'help' or 'commands'.
===============================================================================
The Slint mailing list.
Archive: https://www.freelists.org/archive/slint
To subscribe or unsubscribe, email slint-request@xxxxxxxxxxxxx with the subject
'subscribe' or 'unsubscribe', then answer the email you will receive.
More: email slint-request@xxxxxxxxxxxxx with as subject 'help' or 'commands'.

Other related posts: