Skip to content

Commit d258210

Browse files
authored
[CI] Add Ubuntu 24.04 oneAPI build image (#16366)
Add a Ubuntu 24.04 based oneAPI build image. Once I add a build non-oneAPI image I will make sure they share most of the code. I just took the existing 22.04 build image code and added the official oneAPI apt repo and install oneAPI from there. I need to have the Docker image present in HEAD before I can test it in in CI, so this is only the first step and nothing is using it yet. The other Docker CI fail isn't related. Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
1 parent 9324512 commit d258210

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

.github/workflows/sycl-containers.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ jobs:
4747
file: ubuntu2204_build
4848
tag: latest
4949
build_args: ""
50+
- name: Build Ubuntu 24.04 oneAPI Docker image
51+
file: ubuntu2404_build_oneapi
52+
tag: latest
53+
build_args: ""
5054
- name: Intel Drivers Ubuntu 22.04 Docker image
5155
file: ubuntu2204_intel_drivers
5256
tag: latest
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
FROM nvidia/cuda:12.6.3-devel-ubuntu24.04
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
5+
USER root
6+
7+
# Install SYCL prerequisites
8+
COPY scripts/install_build_tools.sh /install.sh
9+
RUN /install.sh
10+
11+
SHELL ["/bin/bash", "-ec"]
12+
13+
# Install oneAPI
14+
15+
# Make the directory if it doesn't exist yet.
16+
# This location is recommended by the distribution maintainers.
17+
RUN mkdir --parents --mode=0755 /etc/apt/keyrings
18+
# Download the key, convert the signing-key to a full
19+
# keyring required by apt and store in the keyring directory
20+
RUN wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | \
21+
gpg --dearmor | tee /etc/apt/keyrings/rocm.gpg > /dev/null && \
22+
# Add rocm repo
23+
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/amdgpu/6.3/ubuntu noble main" \
24+
| tee /etc/apt/sources.list.d/amdgpu.list && \
25+
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/6.3 noble main" \
26+
| tee --append /etc/apt/sources.list.d/rocm.list && \
27+
echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' \
28+
| tee /etc/apt/preferences.d/rocm-pin-600 && \
29+
echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' \
30+
| tee /etc/apt/preferences.d/rocm-pin-600 && \
31+
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor \
32+
| tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \
33+
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" \
34+
| tee /etc/apt/sources.list.d/oneAPI.list && \
35+
apt update
36+
# Install the ROCM kernel driver and oneAPI
37+
RUN apt install -yqq rocm-dev intel-oneapi-compiler-dpcpp-cpp && \
38+
apt-get clean && \
39+
rm -rf /var/lib/apt/lists/*
40+
41+
# By default Ubuntu sets an arbitrary UID value, that is different from host
42+
# system. When CI passes default UID value of 1001, some of LLVM tools fail to
43+
# discover user home directory and fail a few LIT tests. Fixes UID and GID to
44+
# 1001, that is used as default by GitHub Actions.
45+
RUN groupadd -g 1001 sycl && useradd sycl -u 1001 -g 1001 -m -s /bin/bash
46+
# Add sycl user to video/irc groups so that it can access GPU
47+
RUN usermod -aG video sycl
48+
RUN usermod -aG irc sycl
49+
50+
COPY scripts/docker_entrypoint.sh /docker_entrypoint.sh
51+
52+
ENTRYPOINT ["/docker_entrypoint.sh"]
53+

0 commit comments

Comments
 (0)