Skip to content

Commit

Permalink
Add new Ubuntu 24.04 CUDA, ROCm, OneAPI machines
Browse files Browse the repository at this point in the history
This commit adds three new images based on Ubuntu 24.04, with OneAPI
and, optionally, the AMD ROCm and NVIDIA CUDA plugins.
  • Loading branch information
stephenswat committed Jul 22, 2024
1 parent 6e9b223 commit 0629307
Show file tree
Hide file tree
Showing 9 changed files with 166 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
- ubuntu2204_rocm_clang
- ubuntu2404
- ubuntu2404_cuda
- ubuntu2404_cuda_oneapi
- ubuntu2404_rocm_oneapi
- ubuntu2404_oneapi
- alma9-base
steps:
- uses: actions/checkout@v4
Expand Down
65 changes: 65 additions & 0 deletions ubuntu2404_cuda_oneapi/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Docker machinery, part of the ACTS project
#
# (c) 2024 CERN for the benefit of the ACTS project
#
# Mozilla Public License Version 2.0

# Start from the (at the time of writing) latest Acts Ubuntu 24.04 image.
FROM ghcr.io/acts-project/ubuntu2404:53

# Some description for the image.
LABEL description="Ubuntu 24.04 with Acts dependencies and CUDA + oneAPI"
LABEL maintainer="Stephen Nicholas Swatman <[email protected]>"

# Add the Ubuntu 24.04 CUDA repository.
RUN curl -SL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb \
-o cuda-keyring.deb && \
dpkg -i cuda-keyring.deb && \
rm cuda-keyring.deb

# Install CUDA.
ARG CUDA_VERSION=12-5
RUN apt-get update && \
apt-get install -y cuda-compat-${CUDA_VERSION} cuda-cudart-${CUDA_VERSION} \
cuda-libraries-dev-${CUDA_VERSION} \
cuda-command-line-tools-${CUDA_VERSION} \
cuda-minimal-build-${CUDA_VERSION} && \
apt-get clean -y

# Set up the CUDA environment.
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
ENV PATH=/usr/local/cuda/bin:${PATH}
ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:${LD_LIBRARY_PATH}
ENV CUDAHOSTCXX="clang++"
ENV CUDAFLAGS="-allow-unsupported-compiler"

# Set up the Intel package signing key.
RUN mkdir --parents --mode=0755 /etc/apt/keyrings && \
curl -SL https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | \
gpg --dearmor > /usr/share/keyrings/oneapi-archive-keyring.gpg

# Set up the oneAPI repository.
COPY oneapi.list /etc/apt/sources.list.d/

# Install oneAPI.
ARG ONEAPI_VERSION=2024.2
RUN apt-get update && \
apt-get install -y intel-oneapi-compiler-dpcpp-cpp-${ONEAPI_VERSION} && \
apt-get clean -y

# Install the CodePlay NVIDIA plugin on top of oneAPI.
ARG CODEPLAY_PLUGIN_VERSION=2024.2
RUN curl -SL \
"https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=nvidia&version=${CODEPLAY_PLUGIN_VERSION}" \
-o plugin.sh && \
sh plugin.sh --install-dir /opt/intel/oneapi --yes && \
rm plugin.sh

# Set up the oneAPI environment. Note that one *MUST* source the
# /opt/intel/oneapi/setvars.sh script to make the following work. Which has to
# be done in the respective CI scripts.
ENV CC="icx"
ENV CXX="icpx"
ENV SYCLCXX="icpx"
ENV SYCLFLAGS="-fsycl -fsycl-targets=nvidia_gpu_sm_75 -Wno-unknown-cuda-version"
1 change: 1 addition & 0 deletions ubuntu2404_cuda_oneapi/oneapi.list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main
34 changes: 34 additions & 0 deletions ubuntu2404_oneapi/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Docker machinery, part of the ACTS project
#
# (c) 2024 CERN for the benefit of the ACTS project
#
# Mozilla Public License Version 2.0

# Start from the (at the time of writing) latest Acts Ubuntu 24.04 image.
FROM ghcr.io/acts-project/ubuntu2404:53

# Some description for the image.
LABEL description="Ubuntu 24.04 with Acts dependencies and oneAPI"
LABEL maintainer="Stephen Nicholas Swatman <[email protected]>"

# Set up the Intel package signing key.
RUN mkdir --parents --mode=0755 /etc/apt/keyrings && \
curl -SL https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | \
gpg --dearmor > /usr/share/keyrings/oneapi-archive-keyring.gpg

# Set up the oneAPI repository.
COPY oneapi.list /etc/apt/sources.list.d/

# Install oneAPI.
ARG ONEAPI_VERSION=2024.2
RUN apt-get update && \
apt-get install -y intel-oneapi-compiler-dpcpp-cpp-${ONEAPI_VERSION} && \
apt-get clean -y

# Set up the environment. Note that one *MUST* source the
# /opt/intel/oneapi/setvars.sh script to make the following work. Which has to
# be done in the respective CI scripts.
ENV CC="icx"
ENV CXX="icpx"
ENV SYCLCXX="icpx"
ENV SYCLFLAGS="-fsycl -fsycl-targets=spir64,spir64_x86_64"
1 change: 1 addition & 0 deletions ubuntu2404_oneapi/oneapi.list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main
57 changes: 57 additions & 0 deletions ubuntu2404_rocm_oneapi/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Docker machinery, part of the ACTS project
#
# (c) 2024 CERN for the benefit of the ACTS project
#
# Mozilla Public License Version 2.0

# Start from the (at the time of writing) latest Acts Ubuntu 24.04 image.
FROM ghcr.io/acts-project/ubuntu2404:53

# Some description for the image.
LABEL description="Ubuntu 24.04 with Acts dependencies and ROCm/HIP + oneAPI"
LABEL maintainer="Stephen Nicholas Swatman <[email protected]>"

# Set up the ROCm package signing key.
RUN mkdir --parents --mode=0755 /etc/apt/keyrings && \
curl -SL https://repo.radeon.com/rocm/rocm.gpg.key | \
gpg --dearmor > /etc/apt/keyrings/rocm.gpg

# Set up the ROCm repository.
COPY rocm.list /etc/apt/sources.list.d/
COPY rocm-pin-600 /etc/apt/preferences.d/

# Install ROCm/HIP.
ARG ROCM_VERSION=6.1.0
RUN apt-get update && \
apt-get install -y rocm-hip-runtime-dev${ROCM_VERSION} && \
apt-get clean -y
ENV HIP_PLATFORM=amd

# Set up the Intel package signing key.
RUN curl -SL https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | \
gpg --dearmor > /usr/share/keyrings/oneapi-archive-keyring.gpg

# Set up the oneAPI repository.
COPY oneapi.list /etc/apt/sources.list.d/

# Install oneAPI.
ARG ONEAPI_VERSION=2024.2
RUN apt-get update && \
apt-get install -y intel-oneapi-compiler-dpcpp-cpp-${ONEAPI_VERSION} && \
apt-get clean -y

# Install the CodePlay AMD plugin on top of oneAPI.
ARG CODEPLAY_PLUGIN_VERSION=2024.2.0
RUN curl -SL \
"https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=amd&version=${CODEPLAY_PLUGIN_VERSION}" \
-o plugin.sh && \
sh plugin.sh --install-dir /opt/intel/oneapi --yes && \
rm plugin.sh

# Set up the oneAPI environment. Note that one *MUST* source the
# /opt/intel/oneapi/setvars.sh script to make the following work. Which has to
# be done in the respective CI scripts.
ENV CC="icx"
ENV CXX="icpx"
ENV SYCLCXX="icpx"
ENV SYCLFLAGS="-fsycl -fsycl-targets=amd_gpu_gfx1031"
1 change: 1 addition & 0 deletions ubuntu2404_rocm_oneapi/oneapi.list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main
3 changes: 3 additions & 0 deletions ubuntu2404_rocm_oneapi/rocm-pin-600
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Package: *
Pin: release o=repo.radeon.com
Pin-Priority: 600
1 change: 1 addition & 0 deletions ubuntu2404_rocm_oneapi/rocm.list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/6.1 focal main

0 comments on commit 0629307

Please sign in to comment.