Who it is forA developer or small team that wants to stop sending prompts and data to a cloud API.
The problemCloud AI APIs cost money per call and your data leaves your infrastructure.
The outcomeA local endpoint on port 8080 that existing OpenAI or Anthropic clients can call, running on CPU or GPU.
What you need first
- Docker or Podman, or the macOS app (not signed by Apple)
- Optional GPU: NVIDIA, AMD, Intel, Apple Silicon or Vulkan; CPU-only works
- Disk space for the models you pull
Steps
- Start the CPU image:
docker run -ti --name local-ai -p 8080:8080 localai/localai:latest - Or with an NVIDIA GPU:
docker run -ti --name local-ai -p 8080:8080 --gpus all localai/localai:latest-gpu-nvidia-cuda-12 - Load a model, for example
local-ai run llama-3.2-1b-instruct:q4_k_m - Point your app's OpenAI base URL at http://localhost:8080
- Restart later with
docker start -i local-ai
Prompt for your agent
Set up mudler/LocalAI in Docker on this machine (GPU image if an NVIDIA GPU is present, CPU image otherwise), load a small instruct model, and change <app>'s OpenAI client to use it. Run one test request and report latency.
Caveat.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for mudler/LocalAI and "Self-host an OpenAI-compatible API on your own server"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer