|
| 1 | +# macOS Installation Guide for RamaLama |
| 2 | + |
| 3 | +This guide covers the different ways to install RamaLama on macOS. |
| 4 | + |
| 5 | +## Method 1: Self-Contained Installer Package (Recommended) |
| 6 | + |
| 7 | +The easiest way to install RamaLama on macOS is using our self-contained `.pkg` installer. This method includes Python and all dependencies, so you don't need to install anything else. |
| 8 | + |
| 9 | +### Download and Install |
| 10 | + |
| 11 | +1. Download the latest installer from the [Releases page](https://github.com/containers/ramalama/releases) |
| 12 | +2. Double-click the downloaded `.pkg` file |
| 13 | +3. Follow the installation wizard |
| 14 | + |
| 15 | +Or via command line: |
| 16 | + |
| 17 | +```bash |
| 18 | +# Download the installer (replace VERSION with the actual version) |
| 19 | +curl -LO https://github.com/containers/ramalama/releases/download/vVERSION/RamaLama-VERSION-macOS-Installer.pkg |
| 20 | + |
| 21 | +# Verify the SHA256 checksum (optional but recommended) |
| 22 | +curl -LO https://github.com/containers/ramalama/releases/download/vVERSION/RamaLama-VERSION-macOS-Installer.pkg.sha256 |
| 23 | +shasum -a 256 -c RamaLama-VERSION-macOS-Installer.pkg.sha256 |
| 24 | + |
| 25 | +# Install |
| 26 | +sudo installer -pkg RamaLama-VERSION-macOS-Installer.pkg -target / |
| 27 | +``` |
| 28 | + |
| 29 | +### What Gets Installed |
| 30 | + |
| 31 | +The installer places files in: |
| 32 | +- `/usr/local/bin/ramalama` - Main executable |
| 33 | +- `/usr/local/share/ramalama/` - Configuration files |
| 34 | +- `/usr/local/share/man/` - Man pages |
| 35 | +- `/usr/local/share/bash-completion/` - Bash completions |
| 36 | +- `/usr/local/share/fish/` - Fish completions |
| 37 | +- `/usr/local/share/zsh/` - Zsh completions |
| 38 | + |
| 39 | +### Verify Installation |
| 40 | + |
| 41 | +```bash |
| 42 | +# Check version |
| 43 | +ramalama --version |
| 44 | + |
| 45 | +# Get help |
| 46 | +ramalama --help |
| 47 | +``` |
| 48 | + |
| 49 | +## Method 2: Python Package (pip) |
| 50 | + |
| 51 | +If you prefer to use Python package management: |
| 52 | + |
| 53 | +```bash |
| 54 | +# Install Python 3.10 or later (if not already installed) |
| 55 | + |
| 56 | + |
| 57 | +# Install ramalama |
| 58 | +pip3 install ramalama |
| 59 | + |
| 60 | +# Or install from source |
| 61 | +git clone https://github.com/containers/ramalama.git |
| 62 | +cd ramalama |
| 63 | +pip3 install . |
| 64 | +``` |
| 65 | + |
| 66 | +## Method 3: Build from Source |
| 67 | + |
| 68 | +For developers or if you want the latest code: |
| 69 | + |
| 70 | +```bash |
| 71 | +# Clone the repository |
| 72 | +git clone https://github.com/containers/ramalama.git |
| 73 | +cd ramalama |
| 74 | + |
| 75 | +# Install build dependencies |
| 76 | +pip3 install build |
| 77 | + |
| 78 | +# Build and install |
| 79 | +make install |
| 80 | +``` |
| 81 | + |
| 82 | +## Prerequisites |
| 83 | + |
| 84 | +Before using RamaLama, you'll need a container engine: |
| 85 | + |
| 86 | +### Option A: Podman (Recommended) |
| 87 | + |
| 88 | +```bash |
| 89 | +brew install podman |
| 90 | + |
| 91 | +# Initialize Podman machine with libkrun for GPU access |
| 92 | +podman machine init --provider libkrun |
| 93 | +podman machine start |
| 94 | +``` |
| 95 | + |
| 96 | +For more details, see [ramalama-macos(7)](ramalama-macos.7.md). |
| 97 | + |
| 98 | +### Option B: Docker |
| 99 | + |
| 100 | +```bash |
| 101 | +brew install docker |
| 102 | +``` |
| 103 | + |
| 104 | +## Building the Installer Package (For Maintainers) |
| 105 | + |
| 106 | +If you want to build the installer package yourself: |
| 107 | + |
| 108 | +```bash |
| 109 | +# Install PyInstaller |
| 110 | +pip3 install pyinstaller |
| 111 | + |
| 112 | +# Build the package |
| 113 | +./scripts/build_macos_pkg.sh |
| 114 | + |
| 115 | +# The built package will be in: |
| 116 | +# build/macos-pkg/RamaLama-VERSION-macOS-Installer.pkg |
| 117 | +``` |
| 118 | + |
| 119 | +## Uninstallation |
| 120 | + |
| 121 | +To remove RamaLama: |
| 122 | + |
| 123 | +```bash |
| 124 | +# Remove the executable |
| 125 | +sudo rm /usr/local/bin/ramalama |
| 126 | + |
| 127 | +# Remove configuration and data files (optional) |
| 128 | +sudo rm -rf /usr/local/share/ramalama |
| 129 | +rm -rf ~/.local/share/ramalama |
| 130 | +rm -rf ~/.config/ramalama |
| 131 | + |
| 132 | +# Remove man pages (optional) |
| 133 | +sudo rm /usr/local/share/man/man1/ramalama*.1 |
| 134 | +sudo rm /usr/local/share/man/man5/ramalama*.5 |
| 135 | +sudo rm /usr/local/share/man/man7/ramalama*.7 |
| 136 | + |
| 137 | +# Remove shell completions (optional) |
| 138 | +sudo rm /usr/local/share/bash-completion/completions/ramalama |
| 139 | +sudo rm /usr/local/share/fish/vendor_completions.d/ramalama.fish |
| 140 | +sudo rm /usr/local/share/zsh/site-functions/_ramalama |
| 141 | +``` |
| 142 | + |
| 143 | +## Troubleshooting |
| 144 | + |
| 145 | +### "ramalama: command not found" |
| 146 | + |
| 147 | +Make sure `/usr/local/bin` is in your PATH: |
| 148 | + |
| 149 | +```bash |
| 150 | +echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.zshrc |
| 151 | +source ~/.zshrc |
| 152 | +``` |
| 153 | + |
| 154 | +### "Cannot verify developer" warning |
| 155 | + |
| 156 | +macOS may show a security warning for unsigned packages. To bypass: |
| 157 | + |
| 158 | +1. Right-click the `.pkg` file |
| 159 | +2. Select "Open" |
| 160 | +3. Click "Open" in the dialog |
| 161 | + |
| 162 | +Or disable Gatekeeper temporarily: |
| 163 | + |
| 164 | +```bash |
| 165 | +sudo spctl --master-disable |
| 166 | +# Install the package |
| 167 | +sudo spctl --master-enable |
| 168 | +``` |
| 169 | + |
| 170 | +### Podman machine issues |
| 171 | + |
| 172 | +If Podman isn't working: |
| 173 | + |
| 174 | +```bash |
| 175 | +# Reset Podman machine |
| 176 | +podman machine stop |
| 177 | +podman machine rm |
| 178 | +podman machine init --provider libkrun |
| 179 | +podman machine start |
| 180 | +``` |
| 181 | + |
| 182 | +## Getting Started |
| 183 | + |
| 184 | +Once installed, try these commands: |
| 185 | + |
| 186 | +```bash |
| 187 | +# Check version |
| 188 | +ramalama --version |
| 189 | + |
| 190 | +# Pull a model |
| 191 | +ramalama pull tinyllama |
| 192 | + |
| 193 | +# Run a chatbot |
| 194 | +ramalama run tinyllama |
| 195 | + |
| 196 | +# Get help |
| 197 | +ramalama --help |
| 198 | +``` |
| 199 | + |
| 200 | +## Additional Resources |
| 201 | + |
| 202 | +- [RamaLama Documentation](https://ramalama.ai) |
| 203 | +- [GitHub Repository](https://github.com/containers/ramalama) |
| 204 | +- [macOS-specific Documentation](ramalama-macos.7.md) |
| 205 | +- [Report Issues](https://github.com/containers/ramalama/issues) |
| 206 | + |
| 207 | +## System Requirements |
| 208 | + |
| 209 | +- macOS 10.15 (Catalina) or later |
| 210 | +- Intel or Apple Silicon (M1/M2/M3) processor |
| 211 | +- 4GB RAM minimum (8GB+ recommended for running models) |
| 212 | +- 10GB free disk space |
| 213 | +- Podman or Docker |
| 214 | + |
0 commit comments