Skip to content

Commit

Permalink
chore: cuda 12.1.1 for GPU docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
beniz committed Nov 3, 2024
1 parent 372e106 commit 20564de
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions docker/gpu.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# syntax = docker/dockerfile:1.0-experimental
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 AS build

ARG DD_UBUNTU_VERSION=22.04
ARG DD_CUDA_VERSION=12.1.1
ARG DD_CUDNN_VERSION=8
FROM nvidia/cuda:${DD_CUDA_VERSION}-cudnn${DD_CUDNN_VERSION}-devel-ubuntu${DD_UBUNTU_VERSION} AS build


RUN echo UBUNTU_VERSION=${DD_UBUNTU_VERSION} >> /image-info
RUN echo CUDA_VERSION=${DD_CUDA_VERSION} >> /image-info
RUN echo CUDNN_VERSION=${DD_CUDNN_VERSION} >> /image-info

ARG DEEPDETECT_RELEASE=OFF
ARG DEEPDETECT_ARCH=gpu
Expand Down Expand Up @@ -106,7 +115,7 @@ RUN --mount=type=cache,target=/ccache/ mkdir build && cd build && ../build.sh
RUN ./docker/get_libs.sh

# Build final Docker image
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04 AS runtime
FROM nvidia/cuda:${DD_CUDA_VERSION}-cudnn${DD_CUDNN_VERSION}-runtime-ubuntu${DD_UBUNTU_VERSION} AS runtime

ARG DEEPDETECT_ARCH=gpu

Expand Down Expand Up @@ -167,7 +176,7 @@ COPY --from=build /opt/deepdetect/get_models.sh /opt/deepdetect/
COPY --from=build /opt/deepdetect/docker/check-dede-deps.sh /opt/deepdetect/
COPY --from=build /opt/deepdetect/docker/start-dede.sh /opt/deepdetect/

COPY --from=build /usr/local/cuda-11.8/targets/x86_64-linux/lib/libcupti* /usr/local/cuda-11.8/targets/x86_64-linux/lib/
COPY --from=build /usr/local/cuda-12.1/targets/x86_64-linux/lib/libcupti* /usr/local/cuda-12.1/targets/x86_64-linux/lib/

# External volume to be mapped, e.g. for models or training data
WORKDIR /opt/models
Expand Down

0 comments on commit 20564de

Please sign in to comment.