Skip to content

Commit 38a800e

Browse files
ilopezlunadoringemanericcurtin
authored
configure: make command visible by removing hidden flag (#219)
* fix(configure): make command visible by removing hidden flag * ci: fix docs-validate Dockerfile target Signed-off-by: Dorin Geman <dorin.geman@docker.com> * fix(configure): update command visibility and enhance packaging options for Safetensors * fix(ci): use current workdir for Validate Signed-off-by: Dorin Geman <dorin.geman@docker.com> * Add --host flag to docker model install-runner command Add clarifying comment about host security for auto-installation Add tests for --host flag in install-runner command Signed-off-by: Eric Curtin <eric.curtin@docker.com> * fix(configure): add host option to docker model install-runner command --------- Signed-off-by: Dorin Geman <dorin.geman@docker.com> Signed-off-by: Eric Curtin <eric.curtin@docker.com> Co-authored-by: Dorin Geman <dorin.geman@docker.com> Co-authored-by: Eric Curtin <eric.curtin@docker.com>
1 parent b8802e9 commit 38a800e

File tree

9 files changed

+62
-39
lines changed

9 files changed

+62
-39
lines changed

.github/workflows/cli-validate.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,4 @@ jobs:
6262
uses: docker/bake-action@v6
6363
with:
6464
files: ./cmd/cli/docker-bake.hcl
65-
workdir: ./cmd/cli
6665
targets: ${{ matrix.target }}

cmd/cli/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ RUN --mount=target=/context \
3939
git add -A
4040
rm -rf cmd/cli/docs/reference/*
4141
cp -rf /out/* ./cmd/cli/docs/reference/
42-
if [ -n "$(git status --porcelain -- docs/reference)" ]; then
42+
if [ -n "$(git status --porcelain -- cmd/cli/docs/reference)" ]; then
4343
echo >&2 'ERROR: Docs result differs. Please update with "make docs"'
4444
git status --porcelain -- cmd/cli/docs/reference
4545
exit 1

cmd/cli/commands/configure.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ func newConfigureCmd() *cobra.Command {
1212
var opts scheduling.ConfigureRequest
1313

1414
c := &cobra.Command{
15-
Use: "configure [--context-size=<n>] MODEL [-- <runtime-flags...>]",
16-
Short: "Configure runtime options for a model",
17-
Hidden: true,
15+
Use: "configure [--context-size=<n>] MODEL [-- <runtime-flags...>]",
16+
Short: "Configure runtime options for a model",
1817
Args: func(cmd *cobra.Command, args []string) error {
1918
argsBeforeDash := cmd.ArgsLenAtDash()
2019
if argsBeforeDash == -1 {

cmd/cli/docs/reference/docker_model.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ long: |-
66
pname: docker
77
plink: docker.yaml
88
cname:
9+
- docker model configure
910
- docker model df
1011
- docker model inspect
1112
- docker model install-runner
@@ -24,6 +25,7 @@ cname:
2425
- docker model unload
2526
- docker model version
2627
clink:
28+
- docker_model_configure.yaml
2729
- docker_model_df.yaml
2830
- docker_model_inspect.yaml
2931
- docker_model_install-runner.yaml

cmd/cli/docs/reference/docker_model_configure.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ options:
1616
kubernetes: false
1717
swarm: false
1818
deprecated: false
19-
hidden: true
19+
hidden: false
2020
experimental: false
2121
experimentalcli: false
2222
kubernetes: false

cmd/cli/docs/reference/docker_model_install-runner.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ options:
2626
experimentalcli: false
2727
kubernetes: false
2828
swarm: false
29+
- option: host
30+
value_type: string
31+
default_value: 127.0.0.1
32+
description: Host address to bind Docker Model Runner
33+
deprecated: false
34+
hidden: false
35+
experimental: false
36+
experimentalcli: false
37+
kubernetes: false
38+
swarm: false
2939
- option: port
3040
value_type: uint16
3141
default_value: "0"

cmd/cli/docs/reference/docker_model_package.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
command: docker model package
22
short: |
3-
Package a GGUF file into a Docker model OCI artifact, with optional licenses.
3+
Package a GGUF file or Safetensors directory into a Docker model OCI artifact.
44
long: |-
5-
Package a GGUF file into a Docker model OCI artifact, with optional licenses. The package is sent to the model-runner, unless --push is specified.
6-
When packaging a sharded model --gguf should point to the first shard. All shard files should be siblings and should include the index in the file name (e.g. model-00001-of-00015.gguf).
7-
usage: docker model package --gguf <path> [--license <path>...] [--context-size <tokens>] [--push] MODEL
5+
Package a GGUF file or Safetensors directory into a Docker model OCI artifact, with optional licenses. The package is sent to the model-runner, unless --push is specified.
6+
When packaging a sharded GGUF model, --gguf should point to the first shard. All shard files should be siblings and should include the index in the file name (e.g. model-00001-of-00015.gguf).
7+
When packaging a Safetensors model, --safetensors-dir should point to a directory containing .safetensors files and config files (*.json, merges.txt). All files will be auto-discovered and config files will be packaged into a tar archive.
8+
usage: docker model package (--gguf <path> | --safetensors-dir <path>) [--license <path>...] [--context-size <tokens>] [--push] MODEL
89
pname: docker model
910
plink: docker_model.yaml
1011
options:
@@ -29,7 +30,7 @@ options:
2930
swarm: false
3031
- option: gguf
3132
value_type: string
32-
description: absolute path to gguf file (required)
33+
description: absolute path to gguf file
3334
deprecated: false
3435
hidden: false
3536
experimental: false
@@ -58,6 +59,15 @@ options:
5859
experimentalcli: false
5960
kubernetes: false
6061
swarm: false
62+
- option: safetensors-dir
63+
value_type: string
64+
description: absolute path to directory containing safetensors files and config
65+
deprecated: false
66+
hidden: false
67+
experimental: false
68+
experimentalcli: false
69+
kubernetes: false
70+
swarm: false
6171
deprecated: false
6272
hidden: false
6373
experimental: false

cmd/cli/docs/reference/model.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,26 @@ Docker Model Runner
55

66
### Subcommands
77

8-
| Name | Description |
9-
|:------------------------------------------------|:------------------------------------------------------------------------------|
10-
| [`df`](model_df.md) | Show Docker Model Runner disk usage |
11-
| [`inspect`](model_inspect.md) | Display detailed information on one model |
12-
| [`install-runner`](model_install-runner.md) | Install Docker Model Runner (Docker Engine only) |
13-
| [`list`](model_list.md) | List the models pulled to your local environment |
14-
| [`logs`](model_logs.md) | Fetch the Docker Model Runner logs |
15-
| [`package`](model_package.md) | Package a GGUF file into a Docker model OCI artifact, with optional licenses. |
16-
| [`ps`](model_ps.md) | List running models |
17-
| [`pull`](model_pull.md) | Pull a model from Docker Hub or HuggingFace to your local environment |
18-
| [`push`](model_push.md) | Push a model to Docker Hub |
19-
| [`requests`](model_requests.md) | Fetch requests+responses from Docker Model Runner |
20-
| [`rm`](model_rm.md) | Remove local models downloaded from Docker Hub |
21-
| [`run`](model_run.md) | Run a model and interact with it using a submitted prompt or chat mode |
22-
| [`status`](model_status.md) | Check if the Docker Model Runner is running |
23-
| [`tag`](model_tag.md) | Tag a model |
24-
| [`uninstall-runner`](model_uninstall-runner.md) | Uninstall Docker Model Runner |
25-
| [`unload`](model_unload.md) | Unload running models |
26-
| [`version`](model_version.md) | Show the Docker Model Runner version |
8+
| Name | Description |
9+
|:------------------------------------------------|:-------------------------------------------------------------------------------|
10+
| [`configure`](model_configure.md) | Configure runtime options for a model |
11+
| [`df`](model_df.md) | Show Docker Model Runner disk usage |
12+
| [`inspect`](model_inspect.md) | Display detailed information on one model |
13+
| [`install-runner`](model_install-runner.md) | Install Docker Model Runner (Docker Engine only) |
14+
| [`list`](model_list.md) | List the models pulled to your local environment |
15+
| [`logs`](model_logs.md) | Fetch the Docker Model Runner logs |
16+
| [`package`](model_package.md) | Package a GGUF file or Safetensors directory into a Docker model OCI artifact. |
17+
| [`ps`](model_ps.md) | List running models |
18+
| [`pull`](model_pull.md) | Pull a model from Docker Hub or HuggingFace to your local environment |
19+
| [`push`](model_push.md) | Push a model to Docker Hub |
20+
| [`requests`](model_requests.md) | Fetch requests+responses from Docker Model Runner |
21+
| [`rm`](model_rm.md) | Remove local models downloaded from Docker Hub |
22+
| [`run`](model_run.md) | Run a model and interact with it using a submitted prompt or chat mode |
23+
| [`status`](model_status.md) | Check if the Docker Model Runner is running |
24+
| [`tag`](model_tag.md) | Tag a model |
25+
| [`uninstall-runner`](model_uninstall-runner.md) | Uninstall Docker Model Runner |
26+
| [`unload`](model_unload.md) | Unload running models |
27+
| [`version`](model_version.md) | Show the Docker Model Runner version |
2728

2829

2930

cmd/cli/docs/reference/model_package.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
# docker model package
22

33
<!---MARKER_GEN_START-->
4-
Package a GGUF file into a Docker model OCI artifact, with optional licenses. The package is sent to the model-runner, unless --push is specified.
5-
When packaging a sharded model --gguf should point to the first shard. All shard files should be siblings and should include the index in the file name (e.g. model-00001-of-00015.gguf).
4+
Package a GGUF file or Safetensors directory into a Docker model OCI artifact, with optional licenses. The package is sent to the model-runner, unless --push is specified.
5+
When packaging a sharded GGUF model, --gguf should point to the first shard. All shard files should be siblings and should include the index in the file name (e.g. model-00001-of-00015.gguf).
6+
When packaging a Safetensors model, --safetensors-dir should point to a directory containing .safetensors files and config files (*.json, merges.txt). All files will be auto-discovered and config files will be packaged into a tar archive.
67

78
### Options
89

9-
| Name | Type | Default | Description |
10-
|:------------------|:--------------|:--------|:---------------------------------------------------------------------------------------|
11-
| `--chat-template` | `string` | | absolute path to chat template file (must be Jinja format) |
12-
| `--context-size` | `uint64` | `0` | context size in tokens |
13-
| `--gguf` | `string` | | absolute path to gguf file (required) |
14-
| `-l`, `--license` | `stringArray` | | absolute path to a license file |
15-
| `--push` | `bool` | | push to registry (if not set, the model is loaded into the Model Runner content store) |
10+
| Name | Type | Default | Description |
11+
|:--------------------|:--------------|:--------|:---------------------------------------------------------------------------------------|
12+
| `--chat-template` | `string` | | absolute path to chat template file (must be Jinja format) |
13+
| `--context-size` | `uint64` | `0` | context size in tokens |
14+
| `--gguf` | `string` | | absolute path to gguf file |
15+
| `-l`, `--license` | `stringArray` | | absolute path to a license file |
16+
| `--push` | `bool` | | push to registry (if not set, the model is loaded into the Model Runner content store) |
17+
| `--safetensors-dir` | `string` | | absolute path to directory containing safetensors files and config |
1618

1719

1820
<!---MARKER_GEN_END-->

0 commit comments

Comments
 (0)