Skip to content

Commit

Permalink
Add an Ubuntu 24.04 image with CUDA (#103)
Browse files Browse the repository at this point in the history
This commit adds a new variant of the Ubuntu 24.04 image which
incorporates CUDA 12.5.
  • Loading branch information
stephenswat authored May 31, 2024
1 parent 7867b91 commit 7680d98
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
- ubuntu2204_cpp20
- ubuntu2204_rocm_clang
- ubuntu2404
- ubuntu2404_cuda
- centos7-base
- centos8-base
steps:
Expand Down Expand Up @@ -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

30 changes: 30 additions & 0 deletions ubuntu2404_cuda/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"
# 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}"

0 comments on commit 7680d98

Please sign in to comment.