Skip to content

Commit 756bee5

Browse files
authored
Merge pull request #50 from deepnote/hannes/pla-3511-new-cuda-versioned-gpu-images
2 parents 340ccc2 + 2d33ca8 commit 756bee5

File tree

3 files changed

+43
-12
lines changed

3 files changed

+43
-12
lines changed

.circleci/config.yml

Lines changed: 36 additions & 10 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 \
@@ -315,17 +319,39 @@ workflows:
315319
- R << matrix.r-version >>
316320

317321
- build-and-push-gpu:
318-
name: Tensorflow 2.9
319-
cuda-tag: "11.4.3-runtime-ubuntu20.04"
322+
name: Tensorflow 2.9, Cuda 12.6, Ubuntu 20.04
323+
cuda-version: "12.6.3"
324+
ubuntu-version: "20.04"
325+
tf-version: "2.9.1"
326+
python-version: "3.8"
327+
- build-and-push-gpu:
328+
name: Tensorflow 2.11, Cuda 12.6, Ubuntu 20.04
329+
cuda-version: "12.6.3"
330+
ubuntu-version: "20.04"
331+
tf-version: "2.11.1"
332+
python-version: "3.10"
333+
- build-and-push-gpu:
334+
name: Tensorflow 2.15, Cuda 12.6, Ubuntu 22.04
335+
cuda-version: "12.6.3"
336+
ubuntu-version: "22.04"
337+
tf-version: "2.15.0"
338+
python-version: "3.11"
339+
340+
- build-and-push-gpu:
341+
name: Tensorflow 2.9, Cuda 11.8, Ubuntu 20.04
342+
cuda-version: "11.8.0"
343+
ubuntu-version: "20.04"
320344
tf-version: "2.9.1"
321345
python-version: "3.8"
322346
- build-and-push-gpu:
323-
name: Tensorflow 2.11
324-
cuda-tag: "11.4.3-runtime-ubuntu20.04"
347+
name: Tensorflow 2.11, Cuda 11.8, Ubuntu 20.04
348+
cuda-version: "11.8.0"
349+
ubuntu-version: "20.04"
325350
tf-version: "2.11.1"
326351
python-version: "3.10"
327352
- build-and-push-gpu:
328-
name: Tensorflow 2.15
329-
cuda-tag: "12.2.2-runtime-ubuntu22.04"
353+
name: Tensorflow 2.15, Cuda 11.8, Ubuntu 22.04
354+
cuda-version: "11.8.0"
355+
ubuntu-version: "22.04"
330356
tf-version: "2.15.0"
331357
python-version: "3.11"

gpu/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG CUDA_IMAGE_TAG=11.4.3-runtime-ubuntu20.04
1+
ARG CUDA_IMAGE_TAG=12.6.3-runtime-ubuntu20.04
22
FROM nvidia/cuda:${CUDA_IMAGE_TAG}
33

44
ENV DEBIAN_FRONTEND=noninteractive

python/conda/Dockerfile.conda

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ ENV CONDA_ALWAYS_YES=true
1717
# but that would require baking in the URLs for
1818
# different Miniconda installer versions into the Dockerfile.
1919
ARG PYTHON_VERSION
20-
RUN MINICONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh"; \
20+
RUN if [ "$PYTHON_VERSION" = "3.8" ]; then \
21+
# last version of conda compatible with python 3.8
22+
MINICONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-py38_23.11.0-2-Linux-x86_64.sh"; \
23+
else \
24+
MINICONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh"; \
25+
fi && \
2126
wget --quiet $MINICONDA_URL -O /tmp/miniconda.sh && \
2227
/bin/bash /tmp/miniconda.sh -b -p /opt/conda && \
2328
rm /tmp/miniconda.sh && \

0 commit comments

Comments
 (0)