# With Docker

> Run decisio in a container on a GPU host, from the release image pinned by digest, with the weights in a volume and a restart policy.

Source: https://opendecisio.com/docs/deploy/docker/

One command starts the release image, with the weights in a volume. It is ready when `/health` answers.

 shell

```
docker run -d --gpus all --shm-size 8g --restart unless-stopped \
  -p 127.0.0.1:8000:8000 -v decisio-data:/data \
  ghcr.io/aminry/decisio@sha256:9b22076d0d3359b90d1ae9536a4943db45fd3ffd43f8e9b2bba8b0a391ae28da --images on
# answers once the first start has fetched the weights
curl -s http://127.0.0.1:8000/health
```

 

Needs a GPU host with the NVIDIA Container Toolkit. Its comments are shown above their commands.

 

[Figure: The image holds the server; the weights live in a volume. Your backend reaches the container on port 8000, published on 127.0.0.1 only. Inside, the decisio server runs from the release image, pinned by digest, as a non-root user, and sees one NVIDIA card through the NVIDIA Container Toolkit. The weights live in the decisio-data volume at /data, never in the image, so a restart fetches nothing again.]

 

 

## What do you need?

 

- A Linux host with one NVIDIA card, sized as on [a cloud GPU](https://opendecisio.com/docs/deploy/cloud-gpu/#1-pick-your-card).
- Docker with the NVIDIA Container Toolkit, so the container can see the card.

 

 

## Run it with Compose

 

decisio’s compose file, from the release image:

 yaml

```
name: decisio

services:
  decisio:
    image: ghcr.io/aminry/decisio@sha256:9b22076d0d3359b90d1ae9536a4943db45fd3ffd43f8e9b2bba8b0a391ae28da
    command: ["--images", "on"]
    environment:
      DECISIO_BASE: gemma-4-31b       # the default (measured on 96 GB, runs on 80 GB); qwen3.6-35b-a3b, gemma-4-12b or gemma-4-12b-fp8 for the others
    ports:
      - "127.0.0.1:8000:8000"
    volumes:
      - decisio-data:/data
    shm_size: "8gb"
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]
    restart: unless-stopped           # also after a dead engine: the server exits with code 70

volumes:
  decisio-data:
```

 

decisio's compose.yaml, with the release image in place of its local build; [run record](https://github.com/aminry/decisio/tree/v0.60.0/runs/2026-10-01_docker-first-gpu-start).

 

Save it as `compose.yaml` and run `docker compose up -d`. It is ready when `/health` answers 200, as [a healthy server’s answer](https://opendecisio.com/docs/deploy/cloud-gpu/#2-start-the-server) shows.

 

 

## Choose what it serves

  

| Setting | What it does |
| --- | --- |
| `DECISIO_BASE` | the model: `gemma-4-31b` by default, or `gemma-4-12b`, `qwen3.6-35b-a3b`, or a decisio model repository |
| `DECISIO_MODEL` | a checkpoint instead; it brings the model its `config.json` declares |
| `DECISIO_HOST`, `DECISIO_PORT` | where the server listens inside the container |

 

Arguments after the image name go to the server, so every [server flag](https://opendecisio.com/docs/flags/) works.

 

 

## Run fast tables with no Hub access

 

Every release also publishes a fast-table image, `<version>-table`: the release image, unchanged, with the [fast table](https://opendecisio.com/docs/tasks/fast-table/)’s add-on and both static students built in. A fast table of kind `static`, base or multilingual, is then fitted and served with no Hub access, so it suits offline and locked-down hosts:

 shell

```
docker run -d --gpus all --shm-size 8g --restart unless-stopped \
  -p 127.0.0.1:8000:8000 -v decisio-data:/data \
  ghcr.io/aminry/decisio@sha256:13d019f1178deb0efdce1efdbb4c23c2f6aaefb8052a7563a805c36b719d5817 --images on
# answers once the first start has fetched the weights
curl -s http://127.0.0.1:8000/health
```

 

Needs a GPU host with the NVIDIA Container Toolkit. Its comments are shown above their commands.

 

- **What it adds:** the `decisio[table]` extra (scikit-learn, and onnxruntime on the CPU), and potion-base-8M (31 MB) and potion-multilingual-128M (531 MB) at their pinned revisions, with their MIT model cards.
- **Its size:** 551 MB more than the release image, as Docker reports it (9,629 MB against 9,078 MB).
- **`HF_HUB_OFFLINE=1` is safe for the tables.** The model’s weights still come from the volume or the Hub, as for the release image.
- **`DECISIO_STUDENTS_DIR`** points decisio at the students, `/opt/decisio/students` in the image, outside the Hugging Face cache on the volume, which would hide them. A student’s file there is read first, checked against its pinned sha256, and fetched from the Hub only when it is missing.
- **Nothing else changes:** the user, the entry point, the health check and the flags are the release image’s, and it has its own digest and attestations in the release notes.

 

### Add the encoder student

 

The encoder student (`"kind": "encoder"`, bge-base, 436 MB) is not built in. Build it into the image from a clone of the release, or fetch its files into the volume as [Add a decision fast path](https://opendecisio.com/docs/tasks/fast-table/#3-ask-for-it) shows:

 shell

```
git clone --branch v0.60.0 https://github.com/aminry/decisio
cd decisio
docker build -f docker/Dockerfile.table \
  --build-arg BASE=ghcr.io/aminry/decisio@sha256:9b22076d0d3359b90d1ae9536a4943db45fd3ffd43f8e9b2bba8b0a391ae28da \
  --build-arg WITH_ENCODER=1 .
```

 

It builds a 10 GB image on the release image.

 

 

## Build the image yourself

 

To build from source instead, from a clone of the release:

 shell

```
git clone --branch v0.60.0 https://github.com/aminry/decisio
cd decisio
uv build --wheel
docker compose up --build
```

 

Needs a GPU host with the NVIDIA Container Toolkit.

 

This builds the image from decisio’s own `Dockerfile` and `compose.yaml`, with no image digest to set.

 

 

## Good to know

 

- The first start downloads the weights into the `decisio-data` volume at `/data`. They are never part of the image, and a restart does not download them again.
- The container runs as a non-root user, and the port is published on `127.0.0.1` only.
- It checks for an NVIDIA GPU first, and exits with an explanation when it cannot see one.
- When its engine dies, the server exits with code 70. Docker restarts a container when its process exits, not when its health check fails, so `restart: unless-stopped` brings it back.
- After upgrading the image, certify your [tasks](https://opendecisio.com/docs/glossary/#task) again ([Upgrade](https://opendecisio.com/docs/upgrading/)).

 

## What next

 

- [On a cloud GPU](https://opendecisio.com/docs/deploy/cloud-gpu/): the same server without a container, under systemd or Kubernetes.
- [Requirements and limits](https://opendecisio.com/docs/limits/): every machine, the context length and what was measured on what.
- [Operate](https://opendecisio.com/docs/operating/): health, monitoring and what to watch in production.
