Skip to content

Install

Local models

Run Agent blocks and embeddings on Ollama, LM Studio, vLLM, or LiteLLM

Point Sim at a model server you run. Set these on the app, then recreate it; models appear in the model picker.

ServerVariablesModels appear as
OllamaOLLAMA_URLollama/<model>
vLLM or LM StudioVLLM_BASE_URL, optional VLLM_API_KEYvllm/<model>
LiteLLMLITELLM_BASE_URL, optional LITELLM_API_KEYModels the proxy serves

VLLM_BASE_URL accepts the server root or its /v1 URL. Knowledge bases can embed on Ollama too; see Knowledge bases.

Ollama on the Docker host

Save the address in .env beside docker-compose.prod.yml, then recreate the app:

Code
OLLAMA_URL=http://host.docker.internal:11434

Ollama must listen where the container reaches the host. On Linux, bind it to the Docker bridge address, usually OLLAMA_HOST=172.17.0.1:11434 (check with ip -4 addr show docker0). Its API has no authentication, so bind 0.0.0.0 only behind a firewall that blocks port 11434 from outside the host.

Ollama in the Compose stack

docker-compose.ollama.yml adds an Ollama server to the production stack, reachable only inside the Compose network as ollama:11434. Add the address to .env first; the overlay refuses to start without it:

Code
OLLAMA_URL=http://ollama:11434

Start the stack with one server profile, then pull the starter model, gemma3:4b:

Code
# NVIDIA GPU (requires the NVIDIA Container Toolkit); use --profile cpu without a GPU
docker compose -f docker-compose.prod.yml -f docker-compose.ollama.yml --profile gpu up -d
docker compose -f docker-compose.prod.yml -f docker-compose.ollama.yml --profile setup run --rm model-setup

Pull other models inside the server's container, ollama for the GPU profile or ollama-cpu for the CPU profile:

Code
docker compose -f docker-compose.prod.yml -f docker-compose.ollama.yml --profile gpu exec ollama ollama pull llama3.2

Set COMPOSE_FILE=docker-compose.prod.yml:docker-compose.ollama.yml and COMPOSE_PROFILES=gpu (or cpu) in .env so plain docker compose commands and npx sim-setup update include Ollama.

Ollama on Kubernetes

Set ollama.enabled: true in the Helm values to deploy Ollama in the release; the chart points OLLAMA_URL at it. ollama.gpu.enabled: true adds GPU scheduling and the NVIDIA device plugin. The cloud example values carry GPU tolerations for it.

LM Studio

Start LM Studio's local server, load a model, enable Serve on Local Network, and turn on API authentication. Then set:

Code
VLLM_BASE_URL=http://host.docker.internal:1234
VLLM_API_KEY=<lm-studio-api-token>

Select the discovered vllm/<model> entry in the model picker. A raw model ID typed by hand while the server is unreachable is treated as an Ollama model.

Check the connection

Code
docker compose -f docker-compose.prod.yml exec simstudio printenv OLLAMA_URL VLLM_BASE_URL

Each variable the container received prints one line. A missing line means it never reached the container: confirm it is in .env and recreate the app with docker compose -f docker-compose.prod.yml up -d.

Was this helpful?
Suggest an edit