forked from intel/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathubuntu2004_build.Dockerfile
More file actions
33 lines (25 loc) · 1.16 KB
/
Copy pathubuntu2004_build.Dockerfile
File metadata and controls
33 lines (25 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM nvidia/cuda:11.4.2-devel-ubuntu20.04
ENV DEBIAN_FRONTEND=noninteractive
USER root
# Install SYCL prerequisites
COPY scripts/install_build_tools.sh /install.sh
RUN /install.sh
# Install AMD ROCm
RUN apt install -yqq libnuma-dev wget gnupg2 && \
wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | apt-key add - && \
echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/debian/ ubuntu main' | tee /etc/apt/sources.list.d/rocm.list && \
apt update && \
apt install -yqq rocm-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# By default Ubuntu sets an arbitrary UID value, that is different from host
# system. When CI passes default UID value of 1001, some of LLVM tools fail to
# discover user home directory and fail a few LIT tests. Fixes UID and GID to
# 1001, that is used as default by GitHub Actions.
RUN groupadd -g 1001 sycl && useradd sycl -u 1001 -g 1001 -m -s /bin/bash
# Add sycl user to video group so that it can access GPU
RUN usermod -aG video sycl
COPY actions/cached_checkout /actions/cached_checkout
COPY actions/cleanup /actions/cleanup
COPY scripts/docker_entrypoint.sh /docker_entrypoint.sh
ENTRYPOINT ["/docker_entrypoint.sh"]