From 25e6c009537fa047897bd8ede352e06498123493 Mon Sep 17 00:00:00 2001 From: Keigh Rim Date: Wed, 11 Mar 2026 20:40:28 -0400 Subject: [PATCH] Add hf4/hf5 container images, keep hf as alias to hf5 (#256) Split -hf images into -hf4 (transformers 4.x) and -hf5 (transformers 5.x) variants. Existing -hf images become thin aliases that FROM the corresponding -hf5 image for backward compatibility. --- .github/workflows/containers.yml | 64 ++++++++++++++++++++++++++--- container/ffmpeg-hf.containerfile | 8 +--- container/ffmpeg-hf4.containerfile | 6 +++ container/ffmpeg-hf5.containerfile | 6 +++ container/hf.containerfile | 8 +--- container/hf4.containerfile | 6 +++ container/hf5.containerfile | 6 +++ container/opencv4-hf.containerfile | 8 +--- container/opencv4-hf4.containerfile | 6 +++ container/opencv4-hf5.containerfile | 6 +++ 10 files changed, 101 insertions(+), 23 deletions(-) create mode 100644 container/ffmpeg-hf4.containerfile create mode 100644 container/ffmpeg-hf5.containerfile create mode 100644 container/hf4.containerfile create mode 100644 container/hf5.containerfile create mode 100644 container/opencv4-hf4.containerfile create mode 100644 container/opencv4-hf5.containerfile diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 2c9160c..9241041 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -116,6 +116,15 @@ jobs: buildfilename: './container/opencv4.containerfile' version: ${{ needs.set-version.outputs.version }} + call-build-hf: + name: "🤙 Call container workflow with `hf`" + needs: ['set-version', 'call-build-hf5'] + uses: ./.github/workflows/container.yml + secrets: inherit + with: + buildfilename: './container/hf.containerfile' + version: ${{ needs.set-version.outputs.version }} + call-build-opencv4-tf2: name: "🤙 Call container workflow with `opencv4-tf2`" needs: ['set-version', 'call-build-opencv4'] @@ -134,29 +143,74 @@ jobs: buildfilename: './container/opencv4-torch2.containerfile' version: ${{ needs.set-version.outputs.version }} - call-build-hf: - name: "🤙 Call container workflow with `hf`" + call-build-hf4: + name: "🤙 Call container workflow with `hf4`" needs: ['set-version', 'call-build-torch2'] uses: ./.github/workflows/container.yml secrets: inherit with: - buildfilename: './container/hf.containerfile' + buildfilename: './container/hf4.containerfile' + version: ${{ needs.set-version.outputs.version }} + + call-build-hf5: + name: "🤙 Call container workflow with `hf5`" + needs: ['set-version', 'call-build-torch2'] + uses: ./.github/workflows/container.yml + secrets: inherit + with: + buildfilename: './container/hf5.containerfile' version: ${{ needs.set-version.outputs.version }} call-build-ffmpeg-hf: name: "🤙 Call container workflow with `ffmpeg-hf`" - needs: ['set-version', 'call-build-ffmpeg-torch2'] + needs: ['set-version', 'call-build-ffmpeg-hf5'] uses: ./.github/workflows/container.yml secrets: inherit with: buildfilename: './container/ffmpeg-hf.containerfile' version: ${{ needs.set-version.outputs.version }} + call-build-ffmpeg-hf4: + name: "🤙 Call container workflow with `ffmpeg-hf4`" + needs: ['set-version', 'call-build-ffmpeg-torch2'] + uses: ./.github/workflows/container.yml + secrets: inherit + with: + buildfilename: './container/ffmpeg-hf4.containerfile' + version: ${{ needs.set-version.outputs.version }} + + call-build-ffmpeg-hf5: + name: "🤙 Call container workflow with `ffmpeg-hf5`" + needs: ['set-version', 'call-build-ffmpeg-torch2'] + uses: ./.github/workflows/container.yml + secrets: inherit + with: + buildfilename: './container/ffmpeg-hf5.containerfile' + version: ${{ needs.set-version.outputs.version }} + call-build-opencv4-hf: name: "🤙 Call container workflow with `opencv4-hf`" - needs: ['set-version', 'call-build-opencv4-torch2'] + needs: ['set-version', 'call-build-opencv4-hf5'] uses: ./.github/workflows/container.yml secrets: inherit with: buildfilename: './container/opencv4-hf.containerfile' version: ${{ needs.set-version.outputs.version }} + + call-build-opencv4-hf4: + name: "🤙 Call container workflow with `opencv4-hf4`" + needs: ['set-version', 'call-build-opencv4-torch2'] + uses: ./.github/workflows/container.yml + secrets: inherit + with: + buildfilename: './container/opencv4-hf4.containerfile' + version: ${{ needs.set-version.outputs.version }} + + call-build-opencv4-hf5: + name: "🤙 Call container workflow with `opencv4-hf5`" + needs: ['set-version', 'call-build-opencv4-torch2'] + uses: ./.github/workflows/container.yml + secrets: inherit + with: + buildfilename: './container/opencv4-hf5.containerfile' + version: ${{ needs.set-version.outputs.version }} diff --git a/container/ffmpeg-hf.containerfile b/container/ffmpeg-hf.containerfile index 0a0dc6b..2a5f387 100644 --- a/container/ffmpeg-hf.containerfile +++ b/container/ffmpeg-hf.containerfile @@ -1,7 +1,3 @@ ARG clams_version -FROM ghcr.io/clamsproject/clams-python-ffmpeg-torch2:$clams_version -LABEL org.opencontainers.image.description="clams-python-ffmpeg-hf image is shipped with clams-python, ffmpeg, and vairous huggingface libraries (PyTorch backend)" - -RUN pip install --no-cache-dir transformers[torch,tokenizers]==5.* -RUN pip install --no-cache-dir datasets - +FROM ghcr.io/clamsproject/clams-python-ffmpeg-hf5:$clams_version +LABEL org.opencontainers.image.description="clams-python-ffmpeg-hf image is an alias for clams-python-ffmpeg-hf5 (latest HuggingFace/transformers)" diff --git a/container/ffmpeg-hf4.containerfile b/container/ffmpeg-hf4.containerfile new file mode 100644 index 0000000..22f70cd --- /dev/null +++ b/container/ffmpeg-hf4.containerfile @@ -0,0 +1,6 @@ +ARG clams_version +FROM ghcr.io/clamsproject/clams-python-ffmpeg-torch2:$clams_version +LABEL org.opencontainers.image.description="clams-python-ffmpeg-hf4 image is shipped with clams-python, ffmpeg, and HuggingFace libraries with transformers 4.x (PyTorch backend)" + +RUN pip install --no-cache-dir transformers[torch,tokenizers]==4.* +RUN pip install --no-cache-dir datasets diff --git a/container/ffmpeg-hf5.containerfile b/container/ffmpeg-hf5.containerfile new file mode 100644 index 0000000..ceb6e4c --- /dev/null +++ b/container/ffmpeg-hf5.containerfile @@ -0,0 +1,6 @@ +ARG clams_version +FROM ghcr.io/clamsproject/clams-python-ffmpeg-torch2:$clams_version +LABEL org.opencontainers.image.description="clams-python-ffmpeg-hf5 image is shipped with clams-python, ffmpeg, and HuggingFace libraries with transformers 5.x (PyTorch backend)" + +RUN pip install --no-cache-dir transformers[torch,tokenizers]==5.* +RUN pip install --no-cache-dir datasets diff --git a/container/hf.containerfile b/container/hf.containerfile index 77c9d8e..6f7bf99 100644 --- a/container/hf.containerfile +++ b/container/hf.containerfile @@ -1,7 +1,3 @@ ARG clams_version -FROM ghcr.io/clamsproject/clams-python-torch2:$clams_version -LABEL org.opencontainers.image.description="clams-python-hf image is shipped with clams-python and vairous huggingface libraries (PyTorch backend)" - -RUN pip install --no-cache-dir transformers[torch,tokenizers]==5.* -RUN pip install --no-cache-dir datasets - +FROM ghcr.io/clamsproject/clams-python-hf5:$clams_version +LABEL org.opencontainers.image.description="clams-python-hf image is an alias for clams-python-hf5 (latest HuggingFace/transformers)" diff --git a/container/hf4.containerfile b/container/hf4.containerfile new file mode 100644 index 0000000..73b1a78 --- /dev/null +++ b/container/hf4.containerfile @@ -0,0 +1,6 @@ +ARG clams_version +FROM ghcr.io/clamsproject/clams-python-torch2:$clams_version +LABEL org.opencontainers.image.description="clams-python-hf4 image is shipped with clams-python and HuggingFace libraries with transformers 4.x (PyTorch backend)" + +RUN pip install --no-cache-dir transformers[torch,tokenizers]==4.* +RUN pip install --no-cache-dir datasets diff --git a/container/hf5.containerfile b/container/hf5.containerfile new file mode 100644 index 0000000..71e0e30 --- /dev/null +++ b/container/hf5.containerfile @@ -0,0 +1,6 @@ +ARG clams_version +FROM ghcr.io/clamsproject/clams-python-torch2:$clams_version +LABEL org.opencontainers.image.description="clams-python-hf5 image is shipped with clams-python and HuggingFace libraries with transformers 5.x (PyTorch backend)" + +RUN pip install --no-cache-dir transformers[torch,tokenizers]==5.* +RUN pip install --no-cache-dir datasets diff --git a/container/opencv4-hf.containerfile b/container/opencv4-hf.containerfile index a1b4841..15226ba 100644 --- a/container/opencv4-hf.containerfile +++ b/container/opencv4-hf.containerfile @@ -1,7 +1,3 @@ ARG clams_version -FROM ghcr.io/clamsproject/clams-python-opencv4-torch2:$clams_version -LABEL org.opencontainers.image.description="clams-python-opencv4-hf image is shipped with clams-python, opencv4 (ffmpeg backend), and vairous huggingface libraries (PyTorch backend)" - -RUN pip install --no-cache-dir transformers[torch,tokenizers]==5.* -RUN pip install --no-cache-dir datasets - +FROM ghcr.io/clamsproject/clams-python-opencv4-hf5:$clams_version +LABEL org.opencontainers.image.description="clams-python-opencv4-hf image is an alias for clams-python-opencv4-hf5 (latest HuggingFace/transformers)" diff --git a/container/opencv4-hf4.containerfile b/container/opencv4-hf4.containerfile new file mode 100644 index 0000000..a79a164 --- /dev/null +++ b/container/opencv4-hf4.containerfile @@ -0,0 +1,6 @@ +ARG clams_version +FROM ghcr.io/clamsproject/clams-python-opencv4-torch2:$clams_version +LABEL org.opencontainers.image.description="clams-python-opencv4-hf4 image is shipped with clams-python, opencv4 (ffmpeg backend), and HuggingFace libraries with transformers 4.x (PyTorch backend)" + +RUN pip install --no-cache-dir transformers[torch,tokenizers]==4.* +RUN pip install --no-cache-dir datasets diff --git a/container/opencv4-hf5.containerfile b/container/opencv4-hf5.containerfile new file mode 100644 index 0000000..bca8759 --- /dev/null +++ b/container/opencv4-hf5.containerfile @@ -0,0 +1,6 @@ +ARG clams_version +FROM ghcr.io/clamsproject/clams-python-opencv4-torch2:$clams_version +LABEL org.opencontainers.image.description="clams-python-opencv4-hf5 image is shipped with clams-python, opencv4 (ffmpeg backend), and HuggingFace libraries with transformers 5.x (PyTorch backend)" + +RUN pip install --no-cache-dir transformers[torch,tokenizers]==5.* +RUN pip install --no-cache-dir datasets