How to Build Ollama from Source on MacOS

CA Amit Singh
Free or Open Source software’s
2 min readMay 10, 2024

--

Learn to Build Ollama from source with cmake and go on MacOS and run large language models.

Here you can Find details about Ollama

Where I can find the Github Repository?

Here is Github repository link

Where I can find website?

Here is Website link

Where I can find Docker Images?

Here is link for Docker hub Images

Where I can find detail about Ollama python Library details?

Here is link for Ollama-Python

Where I can find link for Ollama Javascript Library?

Here is link for Ollama Javascript Library

Where is Ollama Models Library?

Here is link for Ollama Models library.

Now to Build Ollama from source quickly.

Kindly note that you will require cmake and go on your system before you build ollama from source.

Step 01: Clone the ollama repository from github with below command

https://github.com/ollama/ollama.git

Step 02: Then generate dependencies with below command

go generate ./...

Step 03: Then Build the binary

go build .

Step 04: Start the server with below command

./ollama serve

Step 05: Open New terminal and move into ollama directory

Step 06: If you have installed Ollama previously with installer and downloaded some models then it will be available for use, to check type below command.

./ollama list

Step 07: Now run your models by tying below commands

./ollama run llama3

Here is youtube video for visual reference

--

--

CA Amit Singh
Free or Open Source software’s

Qualified Chartered Accountant & Multi Technology Trainer with 24 yrs of Multi Technology/ Multi Industry Experience. www.linkedin.com/in/ca-amit-singh-07babb