> For the complete documentation index, see [llms.txt](https://docs.viesus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.viesus.com/use-cases/docker-production.md).

# Docker Production Deployment

**The scenario:** A platform runs VIESUS-based enhancement as a containerized microservice on a GPU instance. It must restart automatically, update the license without rebuilding the image, and scale horizontally by adding more GPU instances.

***

## Recommended interface

{% hint style="info" %}
Docker isn't a separate interface — you containerize the interface you already use: the [**CLI**](/reference/cli-reference.md) for batch jobs, or the [**Node.js module**](/reference/node.js-module/overview.md) for a request-driven service.
{% endhint %}

This page covers the deployment concerns common to both. For the build details — Dockerfile, Compose, and run commands — see [Running the VIESUS CLI in Docker](/reference/docker/cli.md) and [Running the Node.js module in Docker](/reference/docker/nodejs.md).

***

## How it works

* A GPU-enabled image is built on an NVIDIA CUDA base, with the VIESUS packages and your chosen interface installed.
* The container is run with GPU access via the **NVIDIA Container Toolkit**, and the **GUID is supplied at runtime** (environment variable or secret) — never baked into the image.
* A health check lets your orchestrator know when the service is ready, and logs are emitted to stdout for aggregation.
* To scale, run **one container per GPU** and place a load balancer in front of them.

***

## What to consider

| Factor                    | Guidance                                                                                                                                        |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **GPU access**            | Requires Docker plus the NVIDIA Container Toolkit on the host.                                                                                  |
| **GUID security**         | Inject the GUID at runtime via an environment variable or secret; rotating it is just a restart, no rebuild. Never bake it into an image layer. |
| **One GPU per container** | Run a single worker per GPU to avoid VRAM contention and out-of-memory errors.                                                                  |
| **Restart policy**        | Use auto-restart so the service recovers from rare crashes.                                                                                     |
| **Health checks**         | Allow a start-up grace period — initialization takes a few seconds — so a healthy container isn't killed prematurely.                           |
| **Image size**            | A multi-stage build keeps the runtime image small.                                                                                              |
| **Observability**         | Aggregate stdout logs and watch GPU utilisation and latency.                                                                                    |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.viesus.com/use-cases/docker-production.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
