Spaces:
Configuration error
Configuration error
Michele Dolfi
commited on
feat: New container images (#68)
Browse filesSigned-off-by: Michele Dolfi <[email protected]>
- .github/workflows/ci-images-dryrun.yml +20 -22
- .github/workflows/images.yml +21 -34
- .github/workflows/job-image.yml +4 -4
- Makefile +13 -6
.github/workflows/ci-images-dryrun.yml
CHANGED
@@ -8,25 +8,24 @@ concurrency:
|
|
8 |
cancel-in-progress: true
|
9 |
|
10 |
jobs:
|
11 |
-
|
12 |
-
name: Build
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
27 |
|
28 |
-
build_gpu_image:
|
29 |
-
name: Build docling-serve (with GPU support) container image
|
30 |
permissions:
|
31 |
packages: write
|
32 |
contents: read
|
@@ -36,8 +35,7 @@ jobs:
|
|
36 |
uses: ./.github/workflows/job-image.yml
|
37 |
with:
|
38 |
publish: false
|
39 |
-
build_args:
|
40 |
-
|
41 |
-
platforms: linux/amd64
|
42 |
-
ghcr_image_name: ds4sd/docling-serve
|
43 |
quay_image_name: ""
|
|
|
|
8 |
cancel-in-progress: true
|
9 |
|
10 |
jobs:
|
11 |
+
build_image:
|
12 |
+
name: Build ${{ matrix.spec.name }} container image
|
13 |
+
strategy:
|
14 |
+
matrix:
|
15 |
+
spec:
|
16 |
+
- name: ds4sd/docling-serve
|
17 |
+
build_args: |
|
18 |
+
UV_SYNC_EXTRA_ARGS=--no-extra cu124 --no-extra cpu
|
19 |
+
platforms: linux/amd64, linux/arm64
|
20 |
+
- name: ds4sd/docling-serve-cpu
|
21 |
+
build_args: |
|
22 |
+
UV_SYNC_EXTRA_ARGS=--no-extra cu124
|
23 |
+
platforms: linux/amd64, linux/arm64
|
24 |
+
- name: ds4sd/docling-serve-cu124
|
25 |
+
build_args: |
|
26 |
+
UV_SYNC_EXTRA_ARGS=--no-extra cpu
|
27 |
+
platforms: linux/amd64
|
28 |
|
|
|
|
|
29 |
permissions:
|
30 |
packages: write
|
31 |
contents: read
|
|
|
35 |
uses: ./.github/workflows/job-image.yml
|
36 |
with:
|
37 |
publish: false
|
38 |
+
build_args: ${{ matrix.spec.build_args }}
|
39 |
+
ghcr_image_name: ${{ matrix.spec.name }}
|
|
|
|
|
40 |
quay_image_name: ""
|
41 |
+
platforms: ${{ matrix.spec.platforms }}
|
.github/workflows/images.yml
CHANGED
@@ -7,40 +7,29 @@ on:
|
|
7 |
release:
|
8 |
types: [published]
|
9 |
|
10 |
-
# env:
|
11 |
-
# GHCR_REGISTRY: ghcr.io
|
12 |
-
# # GHCR_DOCLING_SERVE_CPU_IMAGE_NAME: ds4sd/docling-serve-cpu
|
13 |
-
# # GHCR_DOCLING_SERVE_GPU_IMAGE_NAME: ds4sd/docling-serve
|
14 |
-
# QUAY_REGISTRY: quay.io
|
15 |
-
# # QUAY_DOCLING_SERVE_CPU_IMAGE_NAME: ds4sd/docling-serve-cpu
|
16 |
-
# # QUAY_DOCLING_SERVE_GPU_IMAGE_NAME: ds4sd/docling-serve
|
17 |
-
|
18 |
concurrency:
|
19 |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
20 |
cancel-in-progress: true
|
21 |
|
22 |
jobs:
|
23 |
-
|
24 |
-
name:
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
-
uses: ./.github/workflows/job-image.yml
|
33 |
-
with:
|
34 |
-
publish: true
|
35 |
-
environment: registry-creds
|
36 |
-
build_args: |
|
37 |
-
UV_SYNC_EXTRA_ARGS=--no-extra cu124
|
38 |
-
ghcr_image_name: ds4sd/docling-serve-cpu
|
39 |
-
quay_image_name: ds4sd/docling-serve-cpu
|
40 |
-
|
41 |
-
|
42 |
-
build_and_publish_gpu_images:
|
43 |
-
name: Push docling-serve (with GPU support) container image to GHCR and QUAY
|
44 |
permissions:
|
45 |
packages: write
|
46 |
contents: read
|
@@ -52,9 +41,7 @@ jobs:
|
|
52 |
with:
|
53 |
publish: true
|
54 |
environment: registry-creds
|
55 |
-
build_args:
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
quay_image_name: ds4sd/docling-serve
|
60 |
-
|
|
|
7 |
release:
|
8 |
types: [published]
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
concurrency:
|
11 |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
12 |
cancel-in-progress: true
|
13 |
|
14 |
jobs:
|
15 |
+
build_and_publish_images:
|
16 |
+
name: Build and push ${{ matrix.spec.name }} container image to GHCR and QUAY
|
17 |
+
strategy:
|
18 |
+
matrix:
|
19 |
+
spec:
|
20 |
+
- name: ds4sd/docling-serve
|
21 |
+
build_args: |
|
22 |
+
UV_SYNC_EXTRA_ARGS=--no-extra cu124 --no-extra cpu
|
23 |
+
platforms: linux/amd64, linux/arm64
|
24 |
+
- name: ds4sd/docling-serve-cpu
|
25 |
+
build_args: |
|
26 |
+
UV_SYNC_EXTRA_ARGS=--no-extra cu124
|
27 |
+
platforms: linux/amd64, linux/arm64
|
28 |
+
- name: ds4sd/docling-serve-cu124
|
29 |
+
build_args: |
|
30 |
+
UV_SYNC_EXTRA_ARGS=--no-extra cpu
|
31 |
+
platforms: linux/amd64
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
permissions:
|
34 |
packages: write
|
35 |
contents: read
|
|
|
41 |
with:
|
42 |
publish: true
|
43 |
environment: registry-creds
|
44 |
+
build_args: ${{ matrix.spec.build_args }}
|
45 |
+
ghcr_image_name: ${{ matrix.spec.name }}
|
46 |
+
quay_image_name: ${{ matrix.spec.name }}
|
47 |
+
platforms: ${{ matrix.spec.platforms }}
|
|
|
|
.github/workflows/job-image.yml
CHANGED
@@ -28,11 +28,7 @@ on:
|
|
28 |
|
29 |
env:
|
30 |
GHCR_REGISTRY: ghcr.io
|
31 |
-
# GHCR_DOCLING_SERVE_CPU_IMAGE_NAME: ds4sd/docling-serve-cpu
|
32 |
-
# GHCR_DOCLING_SERVE_GPU_IMAGE_NAME: ds4sd/docling-serve
|
33 |
QUAY_REGISTRY: quay.io
|
34 |
-
# QUAY_DOCLING_SERVE_CPU_IMAGE_NAME: ds4sd/docling-serve-cpu
|
35 |
-
# QUAY_DOCLING_SERVE_GPU_IMAGE_NAME: ds4sd/docling-serve
|
36 |
|
37 |
jobs:
|
38 |
image:
|
@@ -135,6 +131,10 @@ jobs:
|
|
135 |
cache-to: type=gha,mode=max
|
136 |
file: Containerfile
|
137 |
build-args: ${{ inputs.build_args }}
|
|
|
|
|
|
|
|
|
138 |
|
139 |
- name: Remove Local Docker Images
|
140 |
run: |
|
|
|
28 |
|
29 |
env:
|
30 |
GHCR_REGISTRY: ghcr.io
|
|
|
|
|
31 |
QUAY_REGISTRY: quay.io
|
|
|
|
|
32 |
|
33 |
jobs:
|
34 |
image:
|
|
|
131 |
cache-to: type=gha,mode=max
|
132 |
file: Containerfile
|
133 |
build-args: ${{ inputs.build_args }}
|
134 |
+
|
135 |
+
# - name: Inspect the image details
|
136 |
+
# run: |
|
137 |
+
# echo "${{ steps.ghcr_push.outputs.metadata }}"
|
138 |
|
139 |
- name: Remove Local Docker Images
|
140 |
run: |
|
Makefile
CHANGED
@@ -24,6 +24,13 @@ action-lint-file:
|
|
24 |
md-lint-file:
|
25 |
$(CMD_PREFIX) touch .markdown-lint
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
.PHONY: docling-serve-cpu-image
|
28 |
docling-serve-cpu-image: Containerfile ## Build docling-serve "cpu only" container image
|
29 |
$(ECHO_PREFIX) printf " %-12s Containerfile\n" "[docling-serve CPU]"
|
@@ -31,12 +38,12 @@ docling-serve-cpu-image: Containerfile ## Build docling-serve "cpu only" contain
|
|
31 |
$(CMD_PREFIX) docker tag ghcr.io/ds4sd/docling-serve-cpu:$(TAG) ghcr.io/ds4sd/docling-serve-cpu:main
|
32 |
$(CMD_PREFIX) docker tag ghcr.io/ds4sd/docling-serve-cpu:$(TAG) quay.io/ds4sd/docling-serve-cpu:main
|
33 |
|
34 |
-
.PHONY: docling-serve-
|
35 |
-
docling-serve-
|
36 |
-
$(ECHO_PREFIX) printf " %-12s Containerfile\n" "[docling-serve with
|
37 |
-
$(CMD_PREFIX) docker build --load --build-arg "UV_SYNC_EXTRA_ARGS=--no-extra cpu" -f Containerfile --platform linux/amd64 -t ghcr.io/ds4sd/docling-serve:$(TAG) .
|
38 |
-
$(CMD_PREFIX) docker tag ghcr.io/ds4sd/docling-serve:$(TAG) ghcr.io/ds4sd/docling-serve:main
|
39 |
-
$(CMD_PREFIX) docker tag ghcr.io/ds4sd/docling-serve:$(TAG) quay.io/ds4sd/docling-serve:main
|
40 |
|
41 |
.PHONY: action-lint
|
42 |
action-lint: .action-lint ## Lint GitHub Action workflows
|
|
|
24 |
md-lint-file:
|
25 |
$(CMD_PREFIX) touch .markdown-lint
|
26 |
|
27 |
+
.PHONY: docling-serve-image
|
28 |
+
docling-serve-image: Containerfile
|
29 |
+
$(ECHO_PREFIX) printf " %-12s Containerfile\n" "[docling-serve]"
|
30 |
+
$(CMD_PREFIX) docker build --load --build-arg "UV_SYNC_EXTRA_ARGS=--no-extra cu124 --no-extra cpu" -f Containerfile -t ghcr.io/ds4sd/docling-serve:$(TAG) .
|
31 |
+
$(CMD_PREFIX) docker tag ghcr.io/ds4sd/docling-serve:$(TAG) ghcr.io/ds4sd/docling-serve:main
|
32 |
+
$(CMD_PREFIX) docker tag ghcr.io/ds4sd/docling-serve:$(TAG) quay.io/ds4sd/docling-serve:main
|
33 |
+
|
34 |
.PHONY: docling-serve-cpu-image
|
35 |
docling-serve-cpu-image: Containerfile ## Build docling-serve "cpu only" container image
|
36 |
$(ECHO_PREFIX) printf " %-12s Containerfile\n" "[docling-serve CPU]"
|
|
|
38 |
$(CMD_PREFIX) docker tag ghcr.io/ds4sd/docling-serve-cpu:$(TAG) ghcr.io/ds4sd/docling-serve-cpu:main
|
39 |
$(CMD_PREFIX) docker tag ghcr.io/ds4sd/docling-serve-cpu:$(TAG) quay.io/ds4sd/docling-serve-cpu:main
|
40 |
|
41 |
+
.PHONY: docling-serve-cu124-image
|
42 |
+
docling-serve-cu124-image: Containerfile ## Build docling-serve container image with GPU support
|
43 |
+
$(ECHO_PREFIX) printf " %-12s Containerfile\n" "[docling-serve with Cuda 12.4]"
|
44 |
+
$(CMD_PREFIX) docker build --load --build-arg "UV_SYNC_EXTRA_ARGS=--no-extra cpu" -f Containerfile --platform linux/amd64 -t ghcr.io/ds4sd/docling-serve-cu124:$(TAG) .
|
45 |
+
$(CMD_PREFIX) docker tag ghcr.io/ds4sd/docling-serve-cu124:$(TAG) ghcr.io/ds4sd/docling-serve-cu124:main
|
46 |
+
$(CMD_PREFIX) docker tag ghcr.io/ds4sd/docling-serve-cu124:$(TAG) quay.io/ds4sd/docling-serve-cu124:main
|
47 |
|
48 |
.PHONY: action-lint
|
49 |
action-lint: .action-lint ## Lint GitHub Action workflows
|