Reorganising build.gradle for CUDA 12

Signed-off-by: brian <brian@brutex.de>
CUDA12
Brian Rosenberger 2023-08-29 18:32:22 +02:00
parent 9d1fb9a279
commit 57f493f245
1 changed files with 12 additions and 12 deletions

View File

@ -1,23 +1,23 @@
FROM nvidia/cuda:12.2.0-devel-ubuntu20.04 FROM nvidia/cuda:12.2.0-devel-ubuntu20.04
ENV OS=ubuntu2004 ARG OS=ubuntu2004
ENV cudnn_version=8.9.4.25 ARG cudnn_version=8.9.4.25
ENV cuda_version=cuda12.2 ARG cuda_version=cuda12.2
ENV cmake_version=3.27.4 ARG cmake_version=3.27.4
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y wget software-properties-common RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y wget software-properties-common
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/cuda-${OS}.pin RUN wget https://developer.download.nvidia.com/compute/cuda/repos/$OS/x86_64/cuda-$OS.pin
RUN mv cuda-${OS}.pin /etc/apt/preferences.d/cuda-repository-pin-600 RUN mv cuda-$OS.pin /etc/apt/preferences.d/cuda-repository-pin-600
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/7fa2af80.pub RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/$OS/x86_64/7fa2af80.pub
RUN add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/ /" RUN add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/$OS/x86_64/ /"
RUN apt-get update && apt-get upgrade -y && \ RUN apt-get update && apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-11-jdk \ DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-11-jdk \
build-essential checkinstall zlib1g-dev libssl-dev git libpthread-stubs0-dev \ build-essential checkinstall zlib1g-dev libssl-dev git libpthread-stubs0-dev \
libcudnn8=${cudnn_version}-1+${cuda_version} libcudnn8-dev=${cudnn_version}-1+${cuda_version} libcudnn8=$cudnn_version-1+$cuda_version libcudnn8-dev=$cudnn_version-1+$cuda_version
#RUN apt-get install libcudnn8-samples=${cudnn_version}-1+${cuda_version} #RUN apt-get install libcudnn8-samples=${cudnn_version}-1+${cuda_version}
@ -25,9 +25,9 @@ RUN apt-get update && apt-get upgrade -y && \
#RUN wget https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2.tar.gz && \ #RUN wget https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2.tar.gz && \
# tar -xvf cmake-3.24.2.tar.gz && cd cmake-3.24.2 && \ # tar -xvf cmake-3.24.2.tar.gz && cd cmake-3.24.2 && \
# ./bootstrap && make && make install # ./bootstrap && make && make install
RUN wget -nv https://github.com/Kitware/CMake/releases/download/v${cmake_version}/cmake-${cmake_version}-linux-x86_64.sh && \ RUN wget -nv https://github.com/Kitware/CMake/releases/download/v$cmake_version/cmake-$cmake_version-linux-x86_64.sh && \
mkdir -p /opt/cmake && sh ./cmake-${cmake_version}-linux-x86_64.sh --skip-license --prefix=/opt/cmake && ln -s /opt/cmake/bin/cmake /usr/bin/cmake && \ mkdir -p /opt/cmake && sh ./cmake-$cmake_version-linux-x86_64.sh --skip-license --prefix=/opt/cmake && ln -s /opt/cmake/bin/cmake /usr/bin/cmake && \
rm cmake-${cmake_version}-linux-x86_64.sh rm cmake-$cmake_version-linux-x86_64.sh
RUN ln -s /usr/bin/make /usr/bin/gmake RUN ln -s /usr/bin/make /usr/bin/gmake