Skip to content

Commit 46ec7ab

Browse files
committed
docs: add docker runtime preview and ghcr image instructions
1 parent 6a2955e commit 46ec7ab

4 files changed

Lines changed: 70 additions & 0 deletions

File tree

04-compose/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,22 @@ Example response:
5151
{ "model": "ai/gemma3", "reply": "Use a small base image and a multi-stage build to keep the final image lean." }
5252
```
5353

54+
## Pre-built image
55+
56+
[![ghcr.io](https://img.shields.io/badge/ghcr.io-compose--api-2496ED?logo=docker&logoColor=white)](https://github.com/ppiova/docker-model-runner-lab/pkgs/container/docker-model-runner-lab%2Fcompose-api)
57+
58+
A ready-to-run image is published to GitHub Container Registry by the
59+
[publish workflow](../.github/workflows/publish.yml). Run it without cloning the repo:
60+
61+
```bash
62+
docker run --rm -p 8080:8080 \
63+
-e OPENAI_BASE_URL=http://model-runner.docker.internal/engines/v1 \
64+
-e MODEL=ai/gemma3 \
65+
ghcr.io/ppiova/docker-model-runner-lab/compose-api:latest
66+
```
67+
68+
Docker Model Runner must be enabled so the container can reach `model-runner.docker.internal`.
69+
5470
## Stop
5571

5672
```bash

05-blazor-chat/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,23 @@ docker compose up --build
4343
Compose injects `OPENAI_BASE_URL` and `MODEL` into the container, so the app talks to the model
4444
at `http://model-runner.docker.internal` with no extra configuration.
4545

46+
## Pre-built image
47+
48+
[![ghcr.io](https://img.shields.io/badge/ghcr.io-blazor--chat-2496ED?logo=docker&logoColor=white)](https://github.com/ppiova/docker-model-runner-lab/pkgs/container/docker-model-runner-lab%2Fblazor-chat)
49+
50+
A ready-to-run image is published to GitHub Container Registry by the
51+
[publish workflow](../.github/workflows/publish.yml). Run it without cloning the repo:
52+
53+
```bash
54+
docker run --rm -p 8080:8080 \
55+
-e OPENAI_BASE_URL=http://model-runner.docker.internal/engines/v1 \
56+
-e MODEL=ai/gemma3 \
57+
ghcr.io/ppiova/docker-model-runner-lab/blazor-chat:latest
58+
```
59+
60+
Then open `http://localhost:8080`. Docker Model Runner must be enabled so the container can reach
61+
`model-runner.docker.internal`.
62+
4663
## Stop
4764

4865
```bash

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,21 @@ All examples default to `ai/gemma3` and accept a `MODEL` environment variable to
6464

6565
> Every module was tested end to end with .NET 10 and `ai/gemma3` on Docker Desktop, running on the llama.cpp backend.
6666
67+
## Running in Docker
68+
69+
The model and the app run as containers side by side. The model is provisioned by Docker Model
70+
Runner and the apps reach it at `model-runner.docker.internal`, all from a single `docker compose up`.
71+
72+
![docker model status, list and compose ps showing the model and app running](assets/docker-runtime.svg)
73+
74+
The web apps are also published as ready-to-run images on GitHub Container Registry, built by the
75+
[publish workflow](.github/workflows/publish.yml):
76+
77+
| Image | Module | Pull |
78+
| ----- | ------ | ---- |
79+
| [![compose-api](https://img.shields.io/badge/ghcr.io-compose--api-2496ED?logo=docker&logoColor=white)](https://github.com/ppiova/docker-model-runner-lab/pkgs/container/docker-model-runner-lab%2Fcompose-api) | [04-compose](04-compose) | `docker pull ghcr.io/ppiova/docker-model-runner-lab/compose-api:latest` |
80+
| [![blazor-chat](https://img.shields.io/badge/ghcr.io-blazor--chat-2496ED?logo=docker&logoColor=white)](https://github.com/ppiova/docker-model-runner-lab/pkgs/container/docker-model-runner-lab%2Fblazor-chat) | [05-blazor-chat](05-blazor-chat) | `docker pull ghcr.io/ppiova/docker-model-runner-lab/blazor-chat:latest` |
81+
6782
## Endpoints
6883

6984
| Where your code runs | Base URL |

assets/docker-runtime.svg

Lines changed: 22 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)