RamaLama is a free, open source tool that runs local AI models inside containers. You type one command, and it detects your GPU, pulls the right accelerated container image, downloads the model and starts a chatbot or an OpenAI-compatible API server.
It comes from the containers community behind Podman, so it treats AI models the way Podman and Docker treat images: you pull, list, push, run, serve and remove them with familiar commands. The model runs isolated from your system, with no network access by default.
This guide shows how to install RamaLama on Linux, macOS and Windows, run your first model, serve an API with a web UI, pick models from Hugging Face or OCI registries, turn documents into a RAG image, deploy with Quadlet or Kubernetes and fix common problems.
It follows the official README and man pages as of November 2026 (RamaLama 0.26).
- What: run and serve AI models in rootless containers with GPU auto-detection.
- Install:
pip install ramalama,sudo dnf install ramalamaon Fedora, or the macOS .pkg installer. - Needs: Podman or Docker (Windows uses Docker Desktop or Podman Desktop with WSL2).
- Chat:
ramalama run granite3-moe - API + web UI:
ramalama serve llama3on port 8080. - Tip: prefer Hugging Face models; the Ollama transport is being phased out.
Why Use RamaLama?
- No host setup: CUDA, ROCm and other libraries live in the container image, not on your PC.
- Isolation: models run in rootless containers with no network, read-only model mounts and auto-cleanup.
- Many sources: Hugging Face, ModelScope, Ollama, OCI registries such as Quay and Docker Hub, and RamaLama’s own registry.
- Two engines: llama.cpp by default, or vLLM with
--runtime=vllm, plus MLX on Apple Silicon Macs. - Production path: generate Quadlet, Kubernetes or Compose files from the same command you tested with.
| Tool | Best for |
|---|---|
| RamaLama | Container-first, isolated model runs, Podman users, easy deploy to servers |
| Ollama | The simplest desktop app and huge model library |
| Docker Model Runner | Docker Desktop users who want models built into Docker |
| LM Studio | A friendly graphical app for chatting and testing |
If you already run Ollama in a container, compare with our Ollama in Docker guide and Docker Model Runner guide.
Install RamaLama
| System | Install |
|---|---|
| Any (Python 3.9+) | pip install ramalama |
| Linux or macOS script | curl -fsSL https://ramalama.ai/install.sh | bash |
| Fedora | sudo dnf install ramalama |
| macOS installer | Download the .pkg from GitHub Releases and double-click it |
| Windows | pip install ramalama plus Docker Desktop or Podman Desktop with WSL2 |
- Install a container engine. Podman is the default if both are present; Docker works too.
- Install RamaLama using one of the methods above.
- Check it:
ramalama version ramalama inforamalama infoshows the engine, detected GPU and image it will use. - Prefer Docker? Set
RAMALAMA_CONTAINER_ENGINE=dockeror use--engine docker. - NVIDIA on Linux: follow the ramalama-cuda man page to set up the NVIDIA Container Toolkit.
- NVIDIA on Windows: follow the repo’s WSL2 Docker CUDA guide.
On Fedora Silverblue and other immutable systems, install it inside a Toolbox, or with rpm-ostree install ramalama where available. Models are stored in ~/.local/share/ramalama.
How GPU Detection Works
On first run, RamaLama inspects your hardware and pulls a matching image. The image tag follows RamaLama’s minor version, so 0.26.x pulls :0.26 images.
| Hardware | Image |
|---|---|
| CPU or Vulkan | quay.io/ramalama/ramalama |
| NVIDIA (CUDA) | quay.io/ramalama/cuda |
| AMD (ROCm) | quay.io/ramalama/rocm |
| Intel GPU | quay.io/ramalama/intel-gpu |
| Apple Silicon on Linux (Asahi) | quay.io/ramalama/asahi |
| Ascend NPU / Moore Threads | quay.io/ramalama/cann / musa |
You can force a backend with --backend (auto, vulkan, rocm, cuda, sycl, openvino, cann or musa). By default AMD and Intel GPUs use Vulkan on Linux and macOS, while WSL2 prefers ROCm or SYCL. On Macs, models can run with llama.cpp or with MLX using --runtime=mlx and --nocontainer.
Run Your First Model
- Start a chat:
ramalama run granite3-moeThe first run takes a while because it pulls the container image and the model. Later runs are quick.
- Type a question at the prompt and press Enter.
- Run a Hugging Face model by its org/name:
ramalama run hf://ibm-granite/granite-3.3-8b-instruct-GGUF - Exit with Ctrl+D when you are done.
Pick a model that fits your memory. A 7B to 8B model at Q4 needs roughly 6 GB, while 30B-class models need far more. Our RAM for local AI guide has a sizing table.
Where Models Come From
| Transport | Prefix | Example |
|---|---|---|
| Hugging Face | hf:// or huggingface:// |
hf://TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF |
| ModelScope | modelscope:// |
Chinese model hub |
| Ollama | ollama:// |
ollama://smollm:135m |
| OCI registry | oci:// |
oci://quay.io/user/model:latest |
| RamaLama Labs registry | rlcr:// |
registry.ramalama.com |
Names in org/model form go to Hugging Face automatically. Short names like granite come from shortnames.conf files, or fall back to the Ollama transport.
The README warns that Ollama models are no longer compatible with llama.cpp and the Ollama transport will be removed, so move to Hugging Face models. To change the default, set RAMALAMA_TRANSPORT=huggingface.
Serve an OpenAI-Compatible API
- Start a server:
ramalama serve llama3It uses port 8080 if free, otherwise a free port from 8081 to 8090.
- Open the web UI at
http://127.0.0.1:8080in your browser. - Run it in the background with a name and port:
ramalama serve -d -p 8080 --name mymodel hf://ibm-granite/granite-3.3-8b-instruct-GGUF - Call the API from any OpenAI-compatible client with base URL
http://127.0.0.1:8080/v1. - Chat from the terminal against a running server with
ramalama chat. - Stop it:
ramalama stop mymodel, orramalama stop --all.
Useful serve flags:
| Flag | What it does |
|---|---|
--webui off |
API only, no browser chat page |
--ctx-size / -c |
Set the context length (0 = use the model’s value) |
--api-key |
Require a key (llama.cpp runtime only; default is no auth) |
--host |
Listen address; keep 127.0.0.1 unless you need LAN access |
--runtime=vllm |
Use vLLM instead of llama.cpp |
--ngl |
GPU layers to offload (llama-server picks automatically when omitted) |
Because it speaks the OpenAI API, you can point agents at it, for example the goose AI agent, which supports RamaLama through its Ollama provider when served with --runtime-args="--jinja". For a deeper look at the engine underneath, see our llama-server guide.
Chat With Your Documents (RAG)
RamaLama can turn files into a vector database packed inside an OCI image, using the docling tool in a container.
- Build the RAG image from PDFs, DOCX, PPTX, XLSX, HTML, AsciiDoc or Markdown files, or a folder:
ramalama rag ./docs quay.io/yourname/myrag - Run a model with it:
ramalama run --rag quay.io/yourname/myrag granite3-moe - Ask questions about your documents in the chat.
Because the RAG data is an OCI image, you can push it to a registry and share it with your team like any container.
Deploy With Quadlet, Kubernetes or Compose
Once a model works, --generate writes deployment files for you:
ramalama serve --name granite --generate quadlet granite3-moe
ramalama serve --name granite --generate kube granite3-moe
ramalama serve --name granite --generate compose granite3-moe
| Type | Use it for |
|---|---|
| quadlet | Run the model as a systemd service with Podman |
| kube | Kubernetes YAML for a cluster |
| quadlet/kube | Kube YAML run as a pod under systemd |
| compose | Docker Compose or Podman Compose |
Add a path to write the files straight into place, such as --generate kube:/etc/containers/systemd.
Command Cheat Sheet
| Command | What it does |
|---|---|
ramalama pull <model> |
Download a model |
ramalama list |
List downloaded models |
ramalama run <model> |
Chat in the terminal |
ramalama serve <model> |
Start an API and web UI |
ramalama ps / containers |
List running model containers |
ramalama bench <model> |
Benchmark speed |
ramalama convert |
Package a model as an OCI image |
ramalama push |
Push a model to a registry |
ramalama rm <model> / rm --all |
Delete models |
ramalama --dryrun run <model> |
Show the container command without running it |
Security Defaults
- Container isolation: the model process can’t touch your host directly.
- Read-only model mount: the container can’t change model files.
- No network for run:
ramalama runuses--network=none, so nothing leaks out. - Auto-cleanup: containers use
--rm, so temporary data is wiped on exit. - No extra privileges: Linux capabilities are dropped and no-new-privileges is set.
Note that serve opens a port so other apps can reach it. Keep it on 127.0.0.1, and add --api-key if anything else on your network can connect.
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| First run takes ages | Pulling the container image and model | Normal once; later runs reuse both |
| Runs on CPU, not GPU | GPU not passed into containers | Set up NVIDIA Container Toolkit (ramalama-cuda) or WSL2 CUDA; check ramalama info |
| Slow on AMD under WSL2 | Vulkan backend | Use --backend=rocm |
| Ollama model fails to load | Ollama format no longer works with llama.cpp | Use the Hugging Face GGUF version instead |
| Wrong engine used | Podman is preferred when both are installed | Set RAMALAMA_CONTAINER_ENGINE=docker |
| Port already in use | Another server on 8080 | Use -p 8081 or let RamaLama pick a free port |
| Out of memory | Model too big | Pick a smaller or more quantized model; lower --ctx-size |
| Disk filling up | Many models stored | ramalama rm old models; check ~/.local/share/ramalama |
FAQ
Is RamaLama free?
Yes. It’s open source under the MIT license and free to use.
Does RamaLama need Podman?
No. It prefers Podman but works with Docker. Without either, it tries to run the model directly on your system.
Does RamaLama work on Windows?
Yes, with Docker Desktop or Podman Desktop using the WSL2 backend, after pip install ramalama.
Is RamaLama an Ollama replacement?
It can be. It does the same job but runs models in isolated containers and adds OCI, RAG and deployment features.
Can RamaLama use vLLM?
Yes. Add --runtime=vllm to serve with vLLM instead of the default llama.cpp.
Where are models stored?
In ~/.local/share/ramalama by default, or /var/lib/ramalama when run as root.
Can I use it with coding agents?
Yes. ramalama serve exposes an OpenAI-compatible API that most agents and chat apps can use.



