Skip to content

Commit

Permalink
Adds ability to specify and use a digest for base image ref
Browse files Browse the repository at this point in the history
The triggering issue for this change is that apparently Docker Stacks
upgraded Python from 3.11 to 3.12 for their current series of image tags
(all the way up from their base image). This in turn prevents
tensorflow-text from installing. (I suppose it requires Python <= 3.11)

So for the time being we resort to using the SHA digests that were most
recently working. (These may not be the most recent with Python 3.11 inside)
  • Loading branch information
hlapp committed Oct 29, 2024
1 parent 0323a28 commit ae4dd6a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-deploy-cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
uses: ./.github/workflows/build-deploy-py.yml
with:
tf_version: 2.17.0
basedigest: "@sha256:cb1cac983d469ddd8702c382b01a6c02bbb9c9fda1765caf269b38f2d228f9d8"
cuda: true
tag_latest: false
multiplatform: false
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-deploy-py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ on:
required: false
type: boolean
default: false
basedigest:
required: false
type: string
tag_suffix:
required: false
type: string
Expand Down Expand Up @@ -89,6 +92,7 @@ jobs:
build-args: |
CUDA=${{ inputs.cuda && 'cuda-' || '' }}
TENSORFLOW_VERSION=${{ inputs.tf_version }}
DIGEST=${{ inputs.basedigest }}
push: true
platforms: ${{ inputs.multiplatform && inputs.platforms || 'linux/amd64' }}
tags: ${{ steps.meta.outputs.tags }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
uses: ./.github/workflows/build-deploy-py.yml
with:
tf_version: 2.17.0
basedigest: "@sha256:69df640bd1cb69dd6bc30eeeaecffb58ed2cbfe91e62ed9ec0f5a46a0a01f6e8"
tag_latest: false
multiplatform: true

Expand Down
7 changes: 6 additions & 1 deletion Dockerfile-pyonly
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
ARG TENSORFLOW_VERSION=2.17.0
ARG CUDA
FROM quay.io/jupyter/tensorflow-notebook:${CUDA}tensorflow-${TENSORFLOW_VERSION}
ARG TAG=:${CUDA}tensorflow-${TENSORFLOW_VERSION}
ARG DIGEST
ARG IMAGE_REF=${DIGEST:-${TAG}}
ARG IMAGE=quay.io/jupyter/tensorflow-notebook${IMAGE_REF}

FROM ${IMAGE}

LABEL org.opencontainers.image.description="Combines the Docker Stacks tensorflow-notebook and pytorch-notebook containers plus jupytext and custom package additions."

Expand Down
2 changes: 1 addition & 1 deletion requirements.tf-2.15.0.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tensorflow-probability<=0.23.0
tensorflow-text ; platform_machine != "aarch64" and platform_machine != "arm64"
tensorflow-text<=2.15.0 ; platform_machine != "aarch64" and platform_machine != "arm64"
keras-nlp==0.6.3 ; platform_machine != "aarch64"
# At this time, the current release is 4.45.1.
transformers<5.0.0
Expand Down

0 comments on commit ae4dd6a

Please sign in to comment.