From 3a19cb37ed27298ec3b322cc6909a292bd9bb445 Mon Sep 17 00:00:00 2001 From: Keigh Rim Date: Wed, 26 Mar 2025 14:38:23 -0400 Subject: [PATCH] added base images with HF libraries, retired torch1 images --- container/ffmpeg-hf.containerfile | 7 +++++++ container/ffmpeg-tf2-hf.containerfile | 7 +++++++ container/ffmpeg-tf2.containerfile | 3 ++- container/ffmpeg-torch2.containerfile | 3 ++- ...ch.containerfile => ffmpeg-transformers4.containerfile} | 4 ++-- container/ffmpeg.containerfile | 3 ++- container/hf.containerfile | 7 +++++++ container/jdk8.containerfile | 1 + container/opencv4-hf.containerfile | 7 +++++++ container/opencv4-tf2-hf.containerfile | 7 +++++++ container/opencv4-tf2.containerfile | 3 ++- container/opencv4-torch2.containerfile | 3 ++- ...h.containerfile => opencv4-transformers4.containerfile} | 4 ++-- container/opencv4.containerfile | 5 +++-- container/tf2-hf.containerfile | 7 +++++++ container/tf2.containerfile | 1 + container/torch.containerfile | 5 ----- container/torch2.containerfile | 3 ++- container/transformers4.containerfile | 5 +++++ 19 files changed, 68 insertions(+), 17 deletions(-) create mode 100644 container/ffmpeg-hf.containerfile create mode 100644 container/ffmpeg-tf2-hf.containerfile rename container/{ffmpeg-torch.containerfile => ffmpeg-transformers4.containerfile} (52%) create mode 100644 container/hf.containerfile create mode 100644 container/opencv4-hf.containerfile create mode 100644 container/opencv4-tf2-hf.containerfile rename container/{opencv4-torch.containerfile => opencv4-transformers4.containerfile} (50%) create mode 100644 container/tf2-hf.containerfile delete mode 100644 container/torch.containerfile create mode 100644 container/transformers4.containerfile diff --git a/container/ffmpeg-hf.containerfile b/container/ffmpeg-hf.containerfile new file mode 100644 index 0000000..51a2ab3 --- /dev/null +++ b/container/ffmpeg-hf.containerfile @@ -0,0 +1,7 @@ +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]==4.* +RUN pip install --no-cache-dir datasets + diff --git a/container/ffmpeg-tf2-hf.containerfile b/container/ffmpeg-tf2-hf.containerfile new file mode 100644 index 0000000..a981a63 --- /dev/null +++ b/container/ffmpeg-tf2-hf.containerfile @@ -0,0 +1,7 @@ +ARG clams_version +FROM ghcr.io/clamsproject/clams-python-ffmpeg-tf2-torch2:$clams_version +LABEL org.opencontainers.image.description="clams-python-ffmpeg-tf2-hf image is shipped with clams-python, ffmpeg, tensorflow2, and vairous huggingface libraries" + +RUN pip install --no-cache-dir transformers[tf,tokenizers]==4.* +RUN pip install --no-cache-dir datasets + diff --git a/container/ffmpeg-tf2.containerfile b/container/ffmpeg-tf2.containerfile index c75a071..428c590 100644 --- a/container/ffmpeg-tf2.containerfile +++ b/container/ffmpeg-tf2.containerfile @@ -1,6 +1,7 @@ ARG clams_version FROM ghcr.io/clamsproject/clams-python-ffmpeg:$clams_version -LABEL org.opencontainers.image.description="clams-python-ffmpeg-tf2 image is shipped with clams-python, ffmpeg and tensorflow2 libraries" +LABEL org.opencontainers.image.description="clams-python-ffmpeg-tf2 image is shipped with clams-python, ffmpeg, and tensorflow2" RUN apt-get install -y build-essential libhdf5-dev RUN pip install --no-cache-dir tensorflow==2.* + diff --git a/container/ffmpeg-torch2.containerfile b/container/ffmpeg-torch2.containerfile index 3ab1c75..5573c68 100644 --- a/container/ffmpeg-torch2.containerfile +++ b/container/ffmpeg-torch2.containerfile @@ -1,5 +1,6 @@ ARG clams_version FROM ghcr.io/clamsproject/clams-python-ffmpeg:$clams_version -LABEL org.opencontainers.image.description="clams-python-ffmpeg-torch image is shipped with clams-python, ffmpeg and PyTorch2" +LABEL org.opencontainers.image.description="clams-python-ffmpeg-torch2 image is shipped with clams-python, ffmpeg, and PyTorch2" RUN pip install --no-cache-dir torch==2.* + diff --git a/container/ffmpeg-torch.containerfile b/container/ffmpeg-transformers4.containerfile similarity index 52% rename from container/ffmpeg-torch.containerfile rename to container/ffmpeg-transformers4.containerfile index e317cc7..4f355a7 100644 --- a/container/ffmpeg-torch.containerfile +++ b/container/ffmpeg-transformers4.containerfile @@ -1,5 +1,5 @@ ARG clams_version FROM ghcr.io/clamsproject/clams-python-ffmpeg:$clams_version -LABEL org.opencontainers.image.description="clams-python-ffmpeg-torch image is shipped with clams-python, ffmpeg and PyTorch" +LABEL org.opencontainers.image.description="clams-python-ffmpeg-transformers4 image is shipped with clams-python, ffmpeg and HF's transformers4" -RUN pip install --no-cache-dir torch==1.* +RUN pip install --no-cache-dir transformers==4.* diff --git a/container/ffmpeg.containerfile b/container/ffmpeg.containerfile index 01d6ad8..5475bca 100644 --- a/container/ffmpeg.containerfile +++ b/container/ffmpeg.containerfile @@ -1,6 +1,7 @@ ARG clams_version FROM ghcr.io/clamsproject/clams-python:$clams_version -LABEL org.opencontainers.image.description="clams-python-ffmpeg image is shipped with clams-python and ffmpeg (+ python binding)" +LABEL org.opencontainers.image.description="clams-python-ffmpeg image is shipped with clams-python and ffmpeg" RUN apt-get update && apt-get install -y ffmpeg RUN pip install --no-cache-dir ffmpeg-python==0.2.* + diff --git a/container/hf.containerfile b/container/hf.containerfile new file mode 100644 index 0000000..a798c98 --- /dev/null +++ b/container/hf.containerfile @@ -0,0 +1,7 @@ +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]==4.* +RUN pip install --no-cache-dir datasets + diff --git a/container/jdk8.containerfile b/container/jdk8.containerfile index 834b15a..e2281e9 100644 --- a/container/jdk8.containerfile +++ b/container/jdk8.containerfile @@ -5,3 +5,4 @@ LABEL org.opencontainers.image.description="clams-python-jdk8 image is shipped w ENV JAVA_HOME=/opt/java/openjdk COPY --from=eclipse-temurin:8 $JAVA_HOME $JAVA_HOME ENV PATH="${JAVA_HOME}/bin:${PATH}" + diff --git a/container/opencv4-hf.containerfile b/container/opencv4-hf.containerfile new file mode 100644 index 0000000..b28670f --- /dev/null +++ b/container/opencv4-hf.containerfile @@ -0,0 +1,7 @@ +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]==4.* +RUN pip install --no-cache-dir datasets + diff --git a/container/opencv4-tf2-hf.containerfile b/container/opencv4-tf2-hf.containerfile new file mode 100644 index 0000000..a7fe5f3 --- /dev/null +++ b/container/opencv4-tf2-hf.containerfile @@ -0,0 +1,7 @@ +ARG clams_version +FROM ghcr.io/clamsproject/clams-python-opencv4-tf2-torch2:$clams_version +LABEL org.opencontainers.image.description="clams-python-opencv4-tf2-hf image is shipped with clams-python, opencv4 (ffmpeg backend), tensorflow2, and vairous huggingface libraries" + +RUN pip install --no-cache-dir transformers[tf,tokenizers]==4.* +RUN pip install --no-cache-dir datasets + diff --git a/container/opencv4-tf2.containerfile b/container/opencv4-tf2.containerfile index db5dd34..45c2cc6 100644 --- a/container/opencv4-tf2.containerfile +++ b/container/opencv4-tf2.containerfile @@ -1,6 +1,7 @@ ARG clams_version FROM ghcr.io/clamsproject/clams-python-opencv4:$clams_version -LABEL org.opencontainers.image.description="clams-python-opencv4-tf2 image is shipped with clams-python, ffmpeg, opencv4 and tensorflow2 libraries" +LABEL org.opencontainers.image.description="clams-python-opencv4-tf2 image is shipped with clams-python, opencv4 (ffmpeg backend), and tensorflow2" RUN apt-get install -y build-essential libhdf5-dev RUN pip install --no-cache-dir tensorflow==2.* + diff --git a/container/opencv4-torch2.containerfile b/container/opencv4-torch2.containerfile index 083f1a0..fc9489d 100644 --- a/container/opencv4-torch2.containerfile +++ b/container/opencv4-torch2.containerfile @@ -1,5 +1,6 @@ ARG clams_version FROM ghcr.io/clamsproject/clams-python-opencv4:$clams_version -LABEL org.opencontainers.image.description="clams-python-opencv4-torch image is shipped with clams-python, ffmpeg, opencv4, and PyTorch2" +LABEL org.opencontainers.image.description="clams-python-opencv4-torch2 image is shipped with clams-python, opencv4 (ffmpeg backend), and PyTorch2" RUN pip install --no-cache-dir torch==2.* + diff --git a/container/opencv4-torch.containerfile b/container/opencv4-transformers4.containerfile similarity index 50% rename from container/opencv4-torch.containerfile rename to container/opencv4-transformers4.containerfile index 801ad2e..66c3ccb 100644 --- a/container/opencv4-torch.containerfile +++ b/container/opencv4-transformers4.containerfile @@ -1,5 +1,5 @@ ARG clams_version FROM ghcr.io/clamsproject/clams-python-opencv4:$clams_version -LABEL org.opencontainers.image.description="clams-python-opencv4-torch image is shipped with clams-python, ffmpeg, opencv4, and PyTorch" +LABEL org.opencontainers.image.description="clams-python-opencv4-transformers4 image is shipped with clams-python, ffmpeg, opencv4, and HF's transformers4" -RUN pip install --no-cache-dir torch==1.* +RUN pip install --no-cache-dir transformers==4.* diff --git a/container/opencv4.containerfile b/container/opencv4.containerfile index 6b270c6..5ea7381 100644 --- a/container/opencv4.containerfile +++ b/container/opencv4.containerfile @@ -1,6 +1,6 @@ ARG clams_version -FROM ghcr.io/clamsproject/clams-python-ffmpeg:$clams_version -LABEL org.opencontainers.image.description="clams-python-opencv image is shipped with clams-python, ffmpeg, and opencv4 with their python bindings" +FROM ghcr.io/clamsproject/clams-python--ffmpeg:$clams_version +LABEL org.opencontainers.image.description="clams-python-opencv4 image is shipped with clams-python and opencv4 (ffmpeg backend)" ARG OPENCV_VERSION=4.10.0 ARG OPENCV_PATH=/opt/opencv-${OPENCV_VERSION} @@ -43,3 +43,4 @@ RUN rm -rf ${OPENCV_PATH} ${OPENCV_EXTRA_PATH} RUN pip uninstall opencv-python RUN pip install --no-cache-dir opencv-python-headless~=${OPENCV_VERSION} RUN apt-get remove -y g++ cmake make wget unzip libavcodec-dev libavformat-dev libavutil-dev libswscale-dev && apt-get autoremove -y + diff --git a/container/tf2-hf.containerfile b/container/tf2-hf.containerfile new file mode 100644 index 0000000..9f43e42 --- /dev/null +++ b/container/tf2-hf.containerfile @@ -0,0 +1,7 @@ +ARG clams_version +FROM ghcr.io/clamsproject/clams-python-tf2-torch2:$clams_version +LABEL org.opencontainers.image.description="clams-python-tf2-hf image is shipped with clams-python, tensorflow2, and vairous huggingface libraries" + +RUN pip install --no-cache-dir transformers[tf,tokenizers]==4.* +RUN pip install --no-cache-dir datasets + diff --git a/container/tf2.containerfile b/container/tf2.containerfile index f3a6c8d..1a8f4b1 100644 --- a/container/tf2.containerfile +++ b/container/tf2.containerfile @@ -4,3 +4,4 @@ LABEL org.opencontainers.image.description="clams-python-tf2 image is shipped wi RUN apt-get install -y build-essential libhdf5-dev RUN pip install --no-cache-dir tensorflow==2.* + diff --git a/container/torch.containerfile b/container/torch.containerfile deleted file mode 100644 index 1454d85..0000000 --- a/container/torch.containerfile +++ /dev/null @@ -1,5 +0,0 @@ -ARG clams_version -FROM ghcr.io/clamsproject/clams-python:$clams_version -LABEL org.opencontainers.image.description="clams-python-ffmpeg image is shipped with clams-python and PyTorch" - -RUN pip install --no-cache-dir torch==1.* diff --git a/container/torch2.containerfile b/container/torch2.containerfile index 62ea186..9a867f6 100644 --- a/container/torch2.containerfile +++ b/container/torch2.containerfile @@ -1,5 +1,6 @@ ARG clams_version FROM ghcr.io/clamsproject/clams-python:$clams_version -LABEL org.opencontainers.image.description="clams-python-ffmpeg image is shipped with clams-python and PyTorch2" +LABEL org.opencontainers.image.description="clams-python-torch2 image is shipped with clams-python and PyTorch2" RUN pip install --no-cache-dir torch==2.* + diff --git a/container/transformers4.containerfile b/container/transformers4.containerfile new file mode 100644 index 0000000..d1d01b4 --- /dev/null +++ b/container/transformers4.containerfile @@ -0,0 +1,5 @@ +ARG clams_version +FROM ghcr.io/clamsproject/clams-python:$clams_version +LABEL org.opencontainers.image.description="clams-python-transformers4 image is shipped with clams-python and HF's transformers4" + +RUN pip install --no-cache-dir transformers==4.*