r/LocalLLM • • 2d ago

Question Docker vs Native for local LLMs?

I’m considering running local LLMs using Docker (llama.cpp, Ollama, vLLM, SGLang).

We’ve recently started working on a team project, and I’m exploring Docker as a deployment option.

Has anyone tried both Docker and native setups? Any performance differences or issues? Would you recommend Docker for running LLMs in production?

4 Upvotes

6 comments sorted by

5

u/brainchillzZ 2d ago

The vast majority of the people here running things at a reasonably high level are likely running in docker or podman or something similar. Most of the "recipes" that people share here whether it's for VLLM, ninfer, or radiance, halogen, whatever are all packaged that way by default. It makes packaging the stack as a single image easier so all you have to worry about on the host level is the actual gpu driver itself (I'm generalizing but this is mostly true) ... what I've seen is that mostly llama.cpp or ollama are what people very first start with and those are typically the ones you see running on bare metal

4

u/Rollcuin 2d ago

I experimented with docker microvm's on an m5 max mac studio.
For me in made the most sense to run the backend (oMLX or MTPLX) outside of a container, but to put my harness in a microvm.

The backend can't do tool calls itself, and each active session only sees what i give it in the microvm.

3

u/Poprouter 2d ago

for vllm or sglang the container shared memory default is what breaks first, so set ipc to host or raise the shm size before load testing. gpu passthrough needs the nvidia container toolkit matching the host driver, then raw speed is close to native.

2

u/ogfuzzball 2d ago

If on a Mac you can use Apple containers which are super lightweight compared to docker

0

u/brainchillzZ 1d ago

This isn’t remotely true unless the container is completely idle and not running anything. Every single Apple container boots a separate Linux microvm just to exist.

1

u/ogfuzzball 1d ago

What is your experience with Apple containers? They’re a lightweight VM with a much lighter memory footprint than docker

https://macos-tahoe.com/blog/apple-container-vs-docker-developer-guide-2026/