Michele Dolfi commited on
Commit
754bce6
·
unverified ·
1 Parent(s): b189003

feat: New container images (#68)

Browse files

Signed-off-by: Michele Dolfi <[email protected]>

.github/workflows/ci-images-dryrun.yml CHANGED
@@ -8,25 +8,24 @@ concurrency:
8
  cancel-in-progress: true
9
 
10
  jobs:
11
- build_cpu_image:
12
- name: Build docling-serve "CPU only" container image
13
- permissions:
14
- packages: write
15
- contents: read
16
- attestations: write
17
- id-token: write
18
-
19
- uses: ./.github/workflows/job-image.yml
20
- with:
21
- publish: false
22
- build_args: |
23
- UV_SYNC_EXTRA_ARGS=--no-extra cu124
24
- ghcr_image_name: ds4sd/docling-serve-cpu
25
- quay_image_name: ""
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
- UV_SYNC_EXTRA_ARGS=--no-extra cpu
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
- build_and_publish_cpu_images:
24
- name: Push docling-serve "CPU only" container image to GHCR and QUAY
25
- permissions:
26
- packages: write
27
- contents: read
28
- attestations: write
29
- id-token: write
30
- secrets: inherit
 
 
 
 
 
 
 
 
 
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
- UV_SYNC_EXTRA_ARGS=--no-extra cpu
57
- platforms: linux/amd64
58
- ghcr_image_name: ds4sd/docling-serve
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-gpu-image
35
- docling-serve-gpu-image: Containerfile ## Build docling-serve container image with GPU support
36
- $(ECHO_PREFIX) printf " %-12s Containerfile\n" "[docling-serve with GPU]"
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