Deploying Local LLMs and an Application Orchestration Platform: A Practical Guide
This guide walks through deploying a local large language model inference service alongside an application orchestration platform. It covers container runtime setup, hardware and VRAM planning, starting the platform, loading models, and the network configuration needed to connect containers to a host-based inference service. It also includes a troubleshooting order for common failures such as connection errors, DNS resolution, out-of-memory exits, and slow responses. The goal is a reproducible private deployment with consistent configuration across both layers.
1. Why Separate the Inference Engine from the Application Orchestration Platform
When deploying generative AI applications in a private environment, a common approach is to split capabilities into two layers. The bottom layer is a local LLM inference service that handles model loading, VRAM management, and exposing inference endpoints. The top layer is an application orchestration platform that handles prompt composition, knowledge base retrieval, workflow orchestration, and wrapping capabilities behind external APIs.
The core value of this separation is decoupling: models can be upgraded or swapped independently without changes on the application side, and compute resources can be allocated on demand, avoiding contention for the same VRAM and memory between application services and inference services.
A certain open-source LLM application development platform fills the upper-layer role. It combines Backend-as-a-Service and LLMOps concepts, with built-in multi-model compatibility, visual prompt orchestration, a retrieval-augmented generation engine, an agent framework, and workflow design capabilities. A unified interface and API lower the barrier to entry, letting engineers and business staff work in the same collaborative environment. The lower-layer inference service typically runs in a container and exposes a standardized HTTP interface, which the upper platform consumes by registering it as a “model provider.”
The two layers communicate over a standard protocol, so you are not locked into a specific implementation when choosing components. Any backend service that is compatible with the common interface specification will work.
2. Environment Preparation: Container Runtime and Resource Planning
2.1 Installing a Container Runtime
The upper platform is usually started with a single container orchestration file, so the first step is installing a container runtime and the compose plugin on the host. After installation, verify availability with a version check:
docker -vdocker compose version
If a command is reported as not found, environment variables were likely not refreshed after installation. Log out and back in to the session.
2.2 Resource Planning
Local inference is sensitive to memory and VRAM. The table below gives a rough starting point (general rules of thumb only; defer to the model card for actual requirements):
| Model size | Quantization | VRAM / memory reference | Typical use case |
|---|---|---|---|
| 7B class | 4bit | Around 8GB | Single-GPU entry level, chat and summarization |
| 14B class | 4bit | 12–16GB | Moderate-complexity Q&A |
| 32B class | 4bit | 24GB or more | Complex reasoning, code generation |
| 70B class | 4bit | Multiple GPUs or large VRAM | High-difficulty tasks |
If VRAM is insufficient, consider a higher-compression quantization, or fall back to CPU inference, though throughput will drop noticeably.
3. Starting the Application Orchestration Platform
After obtaining the platform source package, enter its container directory and copy the sample environment file into a working configuration:
cp .env.example .env
Then start all services from the current directory:
docker compose up -d
This command brings up every dependency defined in the orchestration file (application service, task queue, database, vector store, reverse proxy, and so on). The first run pulls images and takes a while, so keep the terminal open. Once startup completes, check status:
docker compose ps
If all services report running or healthy, the deployment succeeded. Open the corresponding port on 127.0.0.1 in a browser to reach the initialization page and create an administrator account. Store the credentials safely, and do not expose the management port directly to the public internet.
4. Deploying the Local Inference Service and Loading a Model
4.1 Installation and Verification
Install a local model runtime tool on the host, then verify from the command line:
ollama -v
A version number in the output means installation succeeded. The tool listens on port 11434 by default, which matters for the integration step later.
4.2 Pulling a Model
Choose a model size that matches your hardware, then pull it:
ollama pull deepseek-r1:7b
The pull is a streaming download. If it is interrupted, re-run the command to resume.
4.3 Network Connectivity and Access Control
This is the most frequent point of failure. The tool listens on the loopback address only by default, and an application service inside a container cannot reach the host loopback. You must explicitly widen the listening scope:
# Linux example: bind to all interfacesexport OLLAMA_HOST=0.0.0.0:11434ollama serve
On the platform side, set the model endpoint to an address the container network can actually reach on the host, not 127.0.0.1:
http://host.docker.internal:11434/v1# or the host LAN addresshttp://192.168.1.10:11434/v1
Security note: once listening is opened up, any host that can reach that port can call the model. Restrict source network ranges, or add authentication at the reverse proxy layer. Never leave it exposed on a public network.
5. Connecting the Model in the Platform and Orchestrating an Application
- Go to the model provider page in settings and choose a custom integration that is compatible with the common interface specification.
- Enter the base URL, endpoint path, and key (a placeholder value is fine for a local service).
- Save, then test connectivity. A returned model list means the connection succeeded.
- Create an application, choose chat or workflow type, and write the system prompt.
- Upload business documents to build a knowledge base, configuring chunk length, overlap ratio, and retrieval Top-K.
- Publish it as an API for business systems to call.
Example call:
curl http://127.0.0.1/v1/chat-messages \-H "Authorization: Bearer <platform API key>" \-H "Content-Type: application/json" \-d '{"query":"Summarize the key points of this document","inputs":{}}'
6. Common Failures and Troubleshooting Order
- Platform reports a failed model connection: first test the inference endpoint with
curlon the host, then check the listening address and port mapping. - Container cannot resolve the host name: use the host LAN IP instead, or configure an explicit extra host mapping in the orchestration file.
- Process exits while loading the model: usually insufficient VRAM. Switch to a smaller size or a higher-compression quantization.
- Extremely slow responses: confirm whether inference has fallen back to CPU, and check quantization and concurrency settings.
- Poor knowledge base retrieval: adjust chunking strategy and overlap ratio, and verify that vector dimensions match the embedding model.
- Port already in use: change the mapped port and update the endpoint on the platform side accordingly.
7. Summary
The hard part of running a private generative AI application is usually not the model itself, but connectivity between the inference service and the orchestration platform, how well resources match the workload, and configuration consistency. Working through environment preparation, platform startup, model loading, network connectivity, application orchestration, and monitoring in that order, while double-checking three things — listening address, port mapping, and quantization size — is enough to reproduce the whole environment reliably. From there you can add logging, monitoring and alerting, and elastic scaling from a container platform, moving from single-host validation toward a production setup that can be operated sustainably.
