Skip to content

Added docker model runner and tools #12143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -2228,6 +2228,18 @@
"version: \"?(?<currentValue>.*?)\"?\\n"
]
},
{
"customType": "regex",
"datasourceTemplate": "github-tags",
"depNameTemplate": "docker/model-cli",
"extractVersionTemplate": "^v(?<version>.+)$",
"fileMatch": [
"^tools/docker-model-cli/manifest.yaml$"
],
"matchStrings": [
"version: \"?(?<currentValue>.*?)\"?\\n"
]
},
{
"customType": "regex",
"datasourceTemplate": "github-tags",
Expand Down
23 changes: 23 additions & 0 deletions tools/docker-model-cli/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#syntax=docker/dockerfile:1.15.1@sha256:9857836c9ee4268391bb5b09f9f157f3c91bb15821bb77969642813b0d00518d

FROM ghcr.io/uniget-org/tools/make:latest AS make
FROM ghcr.io/uniget-org/tools/go:latest AS go

FROM registry.gitlab.com/uniget-org/images/ubuntu:24.04 AS prepare
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
/etc/profile.d/ \
/etc/profile.d/
SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
COPY --link --from=go / /usr/local/
COPY --link --from=make / /usr/local/
WORKDIR /go/src/github.com/docker/model-cli
ARG name
ARG version
RUN --mount=type=cache,target=/root/go/pkg/mod <<EOF
check-clone "https://github.com/docker/model-cli" "v${version}"
git clone -q --config advice.detachedHead=false --depth 1 --branch "v${version}" https://github.com/docker/model-cli .
make ce-release VERSION="${version}"
cp dist/docker-model "${prefix}/libexec/docker/cli-plugins/"
EOF
29 changes: 29 additions & 0 deletions tools/docker-model-cli/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# yaml-language-server: $schema=https://tools.uniget.dev/schema.yaml
$schema: https://tools.uniget.dev/schema.yaml
name: docker-model-cli
license:
name: Apache License 2.0
link: https://github.com/docker/model-runner/blob/main/LICENSE
version: "0.1.19"
binary: docker-model
check: ${binary} version 2>&1 | cut -d' ' -f5
build_dependencies:
- go
- make
platforms:
- linux/amd64
- linux/arm64
tags:
- org/docker
- category/development
- lang/go
- type/cli
- ai
homepage: https://github.com/docker/model-cli
repository: https://github.com/docker/model-cli
description: Docker Model Runner CLI Plugin
renovate:
datasource: github-tags
package: docker/model-cli
extractVersion: ^v(?<version>.+)$
priority: low
24 changes: 24 additions & 0 deletions tools/docker-model-distribution/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#syntax=docker/dockerfile:1.15.1@sha256:9857836c9ee4268391bb5b09f9f157f3c91bb15821bb77969642813b0d00518d

FROM ghcr.io/uniget-org/tools/make:latest AS make
FROM ghcr.io/uniget-org/tools/go:latest AS go

FROM registry.gitlab.com/uniget-org/images/ubuntu:24.04 AS prepare
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
/etc/profile.d/ \
/etc/profile.d/
SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
COPY --link --from=go / /usr/local/
COPY --link --from=make / /usr/local/
WORKDIR /go/src/github.com/docker/model-distribution
ARG name
ARG version
RUN --mount=type=cache,target=/root/go/pkg/mod <<EOF
#check-clone "https://github.com/docker/model-distribution" "v${version}"
#git clone -q --config advice.detachedHead=false --depth 1 --branch "v${version}" https://github.com/docker/model-distribution .
git clone -q --config advice.detachedHead=false --depth 1 --branch "main" https://github.com/docker/model-distribution .
make build
cp bin/model-distribution-tool "${prefix}/bin/"
EOF
29 changes: 29 additions & 0 deletions tools/docker-model-distribution/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# yaml-language-server: $schema=https://tools.uniget.dev/schema.yaml
$schema: https://tools.uniget.dev/schema.yaml
name: docker-model-distribution
license:
name: Apache License 2.0
link: https://github.com/docker/model-runner/blob/main/LICENSE
version: "0.0.0"
binary: model-distribution-tool
check: ${binary} --version | cut -d' ' -f3
build_dependencies:
- go
- make
platforms:
- linux/amd64
- linux/arm64
tags:
- org/docker
- category/development
- lang/go
- type/cli
- ai
homepage: https://github.com/docker/model-distribution
repository: https://github.com/docker/model-distribution
description: Library and CLI tool for distributing models using container registries
#renovate:
# datasource: github-releases
# package: docker/model-distribution
# extractVersion: ^v(?<version>.+)$
# priority: low
24 changes: 24 additions & 0 deletions tools/docker-model-runner/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#syntax=docker/dockerfile:1.15.1@sha256:9857836c9ee4268391bb5b09f9f157f3c91bb15821bb77969642813b0d00518d

FROM ghcr.io/uniget-org/tools/make:latest AS make
FROM ghcr.io/uniget-org/tools/go:latest AS go

FROM registry.gitlab.com/uniget-org/images/ubuntu:24.04 AS prepare
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
/etc/profile.d/ \
/etc/profile.d/
SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
COPY --link --from=go / /usr/local/
COPY --link --from=make / /usr/local/
WORKDIR /go/src/github.com/docker/model-runner
ARG name
ARG version
RUN --mount=type=cache,target=/root/go/pkg/mod <<EOF
#check-clone "https://github.com/docker/model-runner" "v${version}"
#git clone -q --config advice.detachedHead=false --depth 1 --branch "v${version}" https://github.com/docker/model-runner .
git clone -q --config advice.detachedHead=false --depth 1 --branch "main" https://github.com/docker/model-runner .
make build
mv model-runner "${prefix}/bin/"
EOF
29 changes: 29 additions & 0 deletions tools/docker-model-runner/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# yaml-language-server: $schema=https://tools.uniget.dev/schema.yaml
$schema: https://tools.uniget.dev/schema.yaml
name: docker-model-runner
license:
name: Apache License 2.0
link: https://github.com/docker/model-runner/blob/main/LICENSE
version: "0.0.0"
binary: model-runner
check: "" # No version parameter
build_dependencies:
- go
- make
platforms:
- linux/amd64
- linux/arm64
tags:
- org/docker
- category/development
- lang/go
- type/daemon
- ai
homepage: https://github.com/docker/model-runner
repository: https://github.com/docker/model-runner
description: Docker Model Runner
#renovate:
# datasource: github-releases
# package: docker/model-runner
# extractVersion: ^v(?<version>.+)$
# priority: low
Loading