File tree
Expand file treeCollapse file tree1 file changed
+42
-1
lines changed Expand file treeCollapse file tree1 file changed
+42
-1
lines changed Original file line number | Diff line number | Diff line change |
---|
@@ -59,4 +59,45 @@ docker compose down
|
59 | 59 |
|
60 | 60 | ```bash
|
61 | 61 | docker compose run <service_name> /bin/bash
|
62 |
| -``` |
| 62 | +``` |
| 63 | + |
| 64 | + |
| 65 | +## Docker Model Runner |
| 66 | + |
| 67 | +_From host terminal_ |
| 68 | +```bash |
| 69 | +curl http://localhost:12345/engines/v1/chat/completions \ |
| 70 | +-H "Content-Type: application/json" \ |
| 71 | +-d '{ |
| 72 | +"model": "ai/gemma3", |
| 73 | +"messages": [ |
| 74 | +{ |
| 75 | +"role": "system", |
| 76 | +"content": "You are a helpful assistant." |
| 77 | +}, |
| 78 | +{ |
| 79 | +"role": "user", |
| 80 | +"content": "Please write 500 words about the fall of Rome." |
| 81 | +} |
| 82 | +] |
| 83 | +}' |
| 84 | +``` |
| 85 | + |
| 86 | +_From within a container_ |
| 87 | +```bash |
| 88 | +curl http://model-runner.docker.internal/engines/v1/chat/completions \ |
| 89 | +-H "Content-Type: application/json" \ |
| 90 | +-d '{ |
| 91 | +"model": "ai/gemma3", |
| 92 | +"messages": [ |
| 93 | +{ |
| 94 | +"role": "system", |
| 95 | +"content": "You are a helpful assistant." |
| 96 | +}, |
| 97 | +{ |
| 98 | +"role": "user", |
| 99 | +"content": "Please write 500 words about the fall of Rome." |
| 100 | +} |
| 101 | +] |
| 102 | +}' |
| 103 | +``` |
You can’t perform that action at this time.
0 commit comments