From 8b13a866276c1002992be4cb8ce4e672778e1fcf Mon Sep 17 00:00:00 2001 From: Keigh Rim Date: Sun, 12 Jul 2026 16:56:29 -0400 Subject: [PATCH] updated torch base container images with minimal c tool chain for triton compat --- clams/develop/templates/app/Containerfile.template | 2 +- container/ffmpeg-torch2.containerfile | 7 +++++++ container/opencv4-torch2.containerfile | 7 +++++++ container/torch2.containerfile | 7 +++++++ 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/clams/develop/templates/app/Containerfile.template b/clams/develop/templates/app/Containerfile.template index c7eda9a..36ffdaf 100644 --- a/clams/develop/templates/app/Containerfile.template +++ b/clams/develop/templates/app/Containerfile.template @@ -3,7 +3,7 @@ FROM ghcr.io/clamsproject/clams-python:$CLAMS_VERSION # See https://github.com/orgs/clamsproject/packages?tab=packages&q=clams-python for more base images # IF you want to automatically publish this image to the clamsproject organization, # 1. you should have generated this template without --no-github-actions flag -# 1. to add arm64 support, change relevant line in .github/workflows/container.yml +# 1. to add arm64 support, set `arm64: true` in .github/workflows/publish.yml # * NOTE that a lots of software doesn't install/compile or run on arm64 architecture out of the box # * make sure you locally test the compatibility of all software dependencies before using arm64 support # 1. use a git tag to trigger the github action. You need to use git tag to properly set app version anyway diff --git a/container/ffmpeg-torch2.containerfile b/container/ffmpeg-torch2.containerfile index 5573c68..c58a432 100644 --- a/container/ffmpeg-torch2.containerfile +++ b/container/ffmpeg-torch2.containerfile @@ -4,3 +4,10 @@ LABEL org.opencontainers.image.description="clams-python-ffmpeg-torch2 image is RUN pip install --no-cache-dir torch==2.* +# PyTorch ships Triton, which JIT-compiles a small host-side CUDA driver shim +# at runtime -- that needs a C compiler + libc headers. Keep it minimal +# (gcc + libc6-dev); build-essential is not required. +RUN apt-get update \ + && apt-get install -y --no-install-recommends gcc libc6-dev \ + && rm -rf /var/lib/apt/lists/* + diff --git a/container/opencv4-torch2.containerfile b/container/opencv4-torch2.containerfile index fc9489d..70e7162 100644 --- a/container/opencv4-torch2.containerfile +++ b/container/opencv4-torch2.containerfile @@ -4,3 +4,10 @@ LABEL org.opencontainers.image.description="clams-python-opencv4-torch2 image is RUN pip install --no-cache-dir torch==2.* +# PyTorch ships Triton, which JIT-compiles a small host-side CUDA driver shim +# at runtime -- that needs a C compiler + libc headers. Keep it minimal +# (gcc + libc6-dev); build-essential is not required. +RUN apt-get update \ + && apt-get install -y --no-install-recommends gcc libc6-dev \ + && rm -rf /var/lib/apt/lists/* + diff --git a/container/torch2.containerfile b/container/torch2.containerfile index 9a867f6..ab35211 100644 --- a/container/torch2.containerfile +++ b/container/torch2.containerfile @@ -4,3 +4,10 @@ LABEL org.opencontainers.image.description="clams-python-torch2 image is shipped RUN pip install --no-cache-dir torch==2.* +# PyTorch ships Triton, which JIT-compiles a small host-side CUDA driver shim +# at runtime -- that needs a C compiler + libc headers. Keep it minimal +# (gcc + libc6-dev); build-essential is not required. +RUN apt-get update \ + && apt-get install -y --no-install-recommends gcc libc6-dev \ + && rm -rf /var/lib/apt/lists/* +