Make your own local ChatGPT on your Macbook with Ollama


Guide: Installing Ollama on macOS via Command Line

Ollama can be easily installed on macOS using Homebrew, a popular package manager. Below are the steps to install and verify Ollama on a Mac. You can also choose to download the installers directly from the Ollama website if you prefer that https://ollama.com/. There is always many ways to Rome as they say :). I choose to use Homebrew in this example


Step 1: Install Homebrew (if not already installed)

Homebrew is necessary for installing Ollama. If you already have Homebrew installed, you can skip to Step 2. If not, open your terminal and install Homebrew by running the following command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

What does this command do?

  • It downloads and runs the official Homebrew installation script from GitHub.
  • The installation script will guide you through the process. It may ask for your password to complete the installation

  • Optional Check: After installation, verify that Homebrew is installed correctly by running:
  brew --version

This command should output the installed version of Homebrew. Like this


Step 2: Install Ollama

Once Homebrew is installed, you can use it to install Ollama with the following command:

brew install ollama
  • What does this command do?
  • It tells Homebrew to download, install, and configure Ollama on your Mac.
  • The process will automatically resolve any dependencies required by Ollama, so you don’t have to worry about installing other tools manually.

Step 3: Verify the Installation

After Ollama is installed, you can try it at the command line, first time it might take a while, as the model is being pulled from the ollama website, and you can interact with it directly in the terminal.

After installation, you can start using Ollama directly from the command line.

ollama run llama3.1:latest

Now you are running Ollama, and you should be able to test it, and get a result like the picture below

Help Documentation: You can also explore the available options and commands by running:
  ollama --help

This will display all the available subcommands and their descriptions, giving you a quick overview of how to interact with Ollama.


Step 5: Keeping Ollama Up-to-Date

To ensure you always have the latest version of Ollama, periodically update Homebrew and upgrade Ollama:

brew update && brew upgrade ollama
  • brew update: This command fetches the latest information about available packages.
  • brew upgrade ollama: This command upgrades Ollama to the latest version if there is a newer release.

Troubleshooting

  • Permission Errors: If you encounter permission-related issues (e.g., “Permission denied”), you may need to use sudo before some commands, like this:
  sudo brew install ollama

Note: Use sudo sparingly and only when necessary, as it gives elevated privileges.

  • Homebrew Path Issues: If you encounter issues where the brew command is not recognized, you may need to add Homebrew to your system’s PATH. To do this, run the following command:
  echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
  eval "$(/opt/homebrew/bin/brew shellenv)"

With these steps, you should be able to install and start using Ollama on macOS through the command line. In the next blog post i will cover how to run Ollama as a service, and connect a nice Gui to it. And get it into VS Code

Posted in Computere, Programmering, Uncategorized | Leave a comment

Black and White March part V

I don’t always go out with a plan, actually i rarely do, but these pictures are from a trip out with some friends for a good dinner during Easter. And i just grabbed the little Ricoh GRIIIx on my way out of the house, and showed it in my pocket, cause it actually fits in a pocket, which for me still is its main selling point, beyond taking really good pictures. Maybe i will get some shots, maybe i wont, but the best camera is the one you have with you !

On the way to the restaurant where i had a like 30 minutes walk, from my house to the city center, i accidentally took on of my recent favorite shots in a long time πŸ™‚ A girl sitting on the stairs, behind the famous party street of my hometown Aalborg “Jomfru Ane Gade”, where all the bars have their behind the scenes in a fenced of area. The weird pattern in the right side is reflections in the fence I’m shooting through

I grabbed a few other shots on the way also, but not in the same league in my totally subjective opinion, but i like the gritty Hard Monotone from the little Ricoh, and they were all warmup shuts, which is actually something i do, start taking pictures in the beginning, just to get into the mindset where i actually see the scenes i want to capture.

This last picture i actually do like a a little, i like that i have a nice foreground, and i tried to “frame” the person walking on the street, in the nice ray of sun that broke out suddenly on a gray day, but didn’t totally succeed, aka i was to slow ! or i could not see the Ricoh screen in the sunlight πŸ™‚

The restaurant, and the following bar visit, also rendered a couple of decent shots, that i really like. Black and White shooting, is good at conveying mood of a place

So what can you learn from this, not much, but bring a camera, if taking pictures makes you happy, just a little bit ! πŸ™‚

Posted in Digital, Photo, Photography, Ricoh, Ricoh Gr IIIx | Leave a comment

Black and White March part IIII

A small walk with the X-100VI, i have been watching a lot of youtube videos lately to try and improve my street photography skills

The first two pictures here, is a good example of what i have been using for a long time, go where the light is, and work with light and shadow, which i still like to do a lot, nice simple pictures, which is more or less my trademark by now, and thats probably why im trying to do “more” now

I the next two pictures here i tried to work with “framing” my subjects in with elements in the foreground, while still have light/shadow in play.

Last technique of the day, working with ICM in Architecture shooting, i do have a person in the buttom frame, but he is not so visible, but i like the picture, especially since it one i have shot a thousand times, and is quite boring, ICM inserts something “fresh” i can work with.

Posted in Photo, Photography, X-100VI | Leave a comment

Black and White March part III

Evening walk with the Fuji X-100VI, for an evening of moody pictures, still getting used to the camera, but the Ibis and the 40 Megapixels is gold worth in the darkness. I’m still shooting jpg only, so limited editing possibilities, but i like the Acros film simulation straight out of camera, so pretty happy, and still much room for cropping in those files ! πŸ™‚

Posted in Photo, Photography, X-100VI | Leave a comment

Black and White March Part II

Experimenting on a grey day with the Ricoh GrIIIx, when it gray in gray you need something to spice things up a little, so i these are some of my first plays with ICM aka Intentional Camera Movement, these are not fantastic, but its a fun technique to spice things up a little, and i will be trying to work it into my street photography more.

Posted in Photography, Ricoh Gr IIIx | Leave a comment