|
| 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