Skip to content

Commit

Permalink
build: Update cuDNN to v9.5.1
Browse files Browse the repository at this point in the history
This replicates the difference between NVIDIA's devel and cudnn-devel
images as used in their own container build pipelines.
  • Loading branch information
Eta0 committed Nov 4, 2024
1 parent fcba3c3 commit fdfd46f
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 4 deletions.
20 changes: 18 additions & 2 deletions Dockerfile.ubuntu20
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
# syntax=docker/dockerfile:1.4

ARG CUDA_VERSION=12.4.1
ARG BASE_IMAGE=nvidia/cuda:${CUDA_VERSION}-cudnn-devel-ubuntu20.04
ARG BASE_IMAGE=nvidia/cuda:${CUDA_VERSION}-devel-ubuntu20.04
FROM ${BASE_IMAGE} AS base

ENV NV_CUDNN_VERSION 9.5.1.17-1
ENV NV_CUDNN_PACKAGE_NAME libcudnn9-cuda-12
ENV NV_CUDNN_PACKAGE libcudnn9-cuda-12=${NV_CUDNN_VERSION}
ENV NV_CUDNN_PACKAGE_DEV libcudnn9-dev-cuda-12=${NV_CUDNN_VERSION}

LABEL com.nvidia.cudnn.version="${NV_CUDNN_VERSION}"

RUN apt-get -qq update && \
apt-get install -y \
--no-install-recommends \
${NV_CUDNN_PACKAGE} \
${NV_CUDNN_PACKAGE_DEV} && \
apt-mark hold ${NV_CUDNN_PACKAGE_NAME} && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get -qq update && \
apt-get -qq install -y \
apt-get -qq install -y \
--allow-change-held-packages \
--no-install-recommends \
--allow-downgrades \
Expand Down
19 changes: 17 additions & 2 deletions Dockerfile.ubuntu22
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
# syntax=docker/dockerfile:1.4

ARG CUDA_VERSION=12.4.1
ARG BASE_IMAGE=nvidia/cuda:${CUDA_VERSION}-cudnn-devel-ubuntu22.04
ARG BASE_IMAGE=nvidia/cuda:${CUDA_VERSION}-devel-ubuntu22.04
FROM ${BASE_IMAGE} AS base

ENV NV_CUDNN_VERSION 9.5.1.17-1
ENV NV_CUDNN_PACKAGE_NAME libcudnn9-cuda-12
ENV NV_CUDNN_PACKAGE libcudnn9-cuda-12=${NV_CUDNN_VERSION}
ENV NV_CUDNN_PACKAGE_DEV libcudnn9-dev-cuda-12=${NV_CUDNN_VERSION}

LABEL com.nvidia.cudnn.version="${NV_CUDNN_VERSION}"

RUN apt-get -qq update && \
apt-get install -y --no-install-recommends \
${NV_CUDNN_PACKAGE} \
${NV_CUDNN_PACKAGE_DEV} && \
apt-mark hold ${NV_CUDNN_PACKAGE_NAME} && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get -qq update && \
apt-get -qq install -y \
apt-get -qq install -y \
--allow-change-held-packages \
--no-install-recommends \
--allow-downgrades \
Expand Down

0 comments on commit fdfd46f

Please sign in to comment.