Skip to content

Commit 9f5fa72

Browse files
committed
Explicitly tag cuda, tf and ubuntu on GPU image
1 parent fc62659 commit 9f5fa72

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

.circleci/config.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -226,14 +226,17 @@ jobs:
226226
machine:
227227
image: ubuntu-2404:current
228228
parameters:
229-
cuda-tag:
229+
cuda-version:
230+
type: string
231+
ubuntu-version:
230232
type: string
231233
tf-version:
232234
type: string
233235
python-version:
234236
type: string
235237
environment:
236-
CUDA_TAG: << parameters.cuda-tag >>
238+
CUDA_VERSION: << parameters.cuda-version >>
239+
UBUNTU_VERSION: << parameters.ubuntu-version >>
237240
TF_VERSION: << parameters.tf-version >>
238241
PY_VERSION: << parameters.python-version >>
239242
steps:
@@ -244,13 +247,14 @@ jobs:
244247
name: Build and push python image
245248
command: |
246249
REPOSITORY="deepnote/tensorflow"
247-
TAG="${TF_VERSION}-gpu"
250+
TAG="gpu-${TF_VERSION}-${CUDA_VERSION}-${UBUNTU_VERSION}"
248251
TAG_SUFFIX="${CIRCLE_PULL_REQUEST:+-ra-${CIRCLE_PULL_REQUEST##*/}}"
252+
CUDA_BASE_IMAGE_TAG=${CUDA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}
249253
docker buildx build \
250254
--file=./gpu/Dockerfile \
251255
--tag=978928340082.dkr.ecr.us-east-1.amazonaws.com/${REPOSITORY}:${TAG}${TAG_SUFFIX} \
252256
--tag=docker.io/${REPOSITORY}:${TAG}${TAG_SUFFIX} \
253-
--build-arg CUDA_IMAGE_TAG=${CUDA_TAG} \
257+
--build-arg CUDA_IMAGE_TAG=${CUDA_BASE_IMAGE_TAG} \
254258
--build-arg TF_VERSION=${TF_VERSION} \
255259
--build-arg PYTHON_VER=${PY_VERSION} \
256260
--cache-from type=registry,ref=docker.io/${REPOSITORY}:${TAG}-buildcache \
@@ -316,16 +320,19 @@ workflows:
316320

317321
- build-and-push-gpu:
318322
name: Tensorflow 2.9
319-
cuda-tag: "12.6.3-runtime-ubuntu20.04"
323+
cuda-version: "12.6.3"
324+
ubuntu-version: "20.04"
320325
tf-version: "2.9.1"
321326
python-version: "3.8"
322327
- build-and-push-gpu:
323328
name: Tensorflow 2.11
324-
cuda-tag: "12.6.3-runtime-ubuntu20.04"
329+
cuda-version: "12.6.3"
330+
ubuntu-version: "20.04"
325331
tf-version: "2.11.1"
326332
python-version: "3.10"
327333
- build-and-push-gpu:
328334
name: Tensorflow 2.15
329-
cuda-tag: "12.6.3-runtime-ubuntu22.04"
335+
cuda-version: "12.6.3"
336+
ubuntu-version: "22.04"
330337
tf-version: "2.15.0"
331338
python-version: "3.11"

0 commit comments

Comments
 (0)