From 7680d9848d05b2d313223648e5b08ea391cd1749 Mon Sep 17 00:00:00 2001 From: Stephen Nicholas Swatman Date: Fri, 31 May 2024 13:25:41 +0200 Subject: [PATCH] Add an Ubuntu 24.04 image with CUDA (#103) This commit adds a new variant of the Ubuntu 24.04 image which incorporates CUDA 12.5. --- .github/workflows/build-images.yml | 2 +- ubuntu2404_cuda/Dockerfile | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 ubuntu2404_cuda/Dockerfile diff --git a/.github/workflows/build-images.yml b/.github/workflows/build-images.yml index 1a8ddad..d5cba46 100644 --- a/.github/workflows/build-images.yml +++ b/.github/workflows/build-images.yml @@ -38,6 +38,7 @@ jobs: - ubuntu2204_cpp20 - ubuntu2204_rocm_clang - ubuntu2404 + - ubuntu2404_cuda - centos7-base - centos8-base steps: @@ -102,4 +103,3 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/${{ matrix.context }}:buildcache cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/${{ matrix.context }}:buildcache,mode=max - diff --git a/ubuntu2404_cuda/Dockerfile b/ubuntu2404_cuda/Dockerfile new file mode 100644 index 0000000..c202870 --- /dev/null +++ b/ubuntu2404_cuda/Dockerfile @@ -0,0 +1,30 @@ +FROM ghcr.io/acts-project/ubuntu2404:47 + +LABEL description="Ubuntu 24.04 with Acts dependencies and CUDA" +LABEL maintainer="Stephen Nicholas Swatman " +# increase whenever any of the RUN commands change +LABEL version="1" + +# DEBIAN_FRONTEND ensures non-blocking operation (tzdata is a problem) +ENV DEBIAN_FRONTEND noninteractive + +ENV CUDA_RUNFILE_NAME="cuda_12.5.0_555.42.02_linux.run" +ENV CUDA_INSTALL_PATH="/usr/local/cuda" + +RUN apt install wget + +RUN wget https://developer.download.nvidia.com/compute/cuda/12.5.0/local_installers/${CUDA_RUNFILE_NAME} && \ + chmod +x ${CUDA_RUNFILE_NAME} && \ + ./${CUDA_RUNFILE_NAME} --toolkit --silent --installpath=${CUDA_INSTALL_PATH} && \ + rm ${CUDA_RUNFILE_NAME} + +ENV CUDA_PATH="${CUDA_INSTALL_PATH}" +ENV CUDA_ROOT="${CUDA_INSTALL_PATH}" +ENV CUDA_HOME="${CUDA_INSTALL_PATH}" +ENV CUDACXX="${CUDA_INSTALL_PATH}/bin/nvcc" +ENV CUDACC="${CUDA_INSTALL_PATH}/bin/nvcc" + +ENV PATH="${CUDA_INSTALL_PATH}/bin:${PATH}" +ENV MANPATH="${CUDA_INSTALL_PATH}/share/man:${MANPATH}" +ENV INCLUDE="${CUDA_INSTALL_PATH}/include:${INCLUDE}" +ENV LD_LIBRARY_PATH="${CUDA_INSTALL_PATH}/lib64:${CUDA_INSTALL_PATH}/lib:${LD_LIBRARY_PATH}"