Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BBots] Dockerfiles for HIP third-party library bot #1267

Open
wants to merge 1 commit into
base: aomp-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions upstream-buildbots/Ubu22-HIP-TPL/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Dockerfile for HIP buildbot container setup

FROM ubuntu:jammy

ARG WORKBASE="/home"

# Install prereqs
COPY prerequisites /tmp/prerequisites

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y unzip $(cat /tmp/prerequisites)

# Prepare ROCm installation
RUN mkdir --parents --mode=0755 /etc/apt/keyrings
RUN wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | \
gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null
RUN apt-get update

COPY rocm.list /etc/apt/sources.list.d/rocm.list
COPY rocm-pin-600 /etc/apt/preferences.d/rocm-pin-600
RUN apt-get update

# hsa-rocr-dev brings in the CMake files for libhsa (libxrender required for HIP blender testing)
RUN apt-get install -y rocm-device-libs rocm-core rocminfo hsa-rocr-dev rocm-hip-runtime \
rocm-hip-runtime-dev libxrender1 libxxf86vm1 libxfixes3 libxi6 libsm6 libice6 libgl1 \
libxkbcommon0 rocthrust-dev rocblas

# Update the group id inside the container to match host (and get access to GPU)
RUN groupadd --gid 109 render
RUN groupmod -g 109 render

# Create buildbot worker user inside the container
RUN useradd --create-home -G video,render --shell /bin/bash botworker

# Prepare container for HIP buildbot (Kokkos / Ginkgo)
RUN mkdir -p ${WORKBASE}/botworker/llvm/External/hip

WORKDIR ${WORKBASE}/botworker/llvm/External
RUN cd hip && ln -s /opt/rocm* .

WORKDIR ${WORKBASE}/botworker/llvm
# Clone LLVM test suite
RUN git clone https://github.com/llvm/llvm-test-suite.git
RUN cd .. && chown -R botworker:botworker llvm

# XXX: When mounting a volume as home, this does not work and needs to be re-done.
ENV PATH=/home/botworker/.local/bin:$PATH
22 changes: 22 additions & 0 deletions upstream-buildbots/Ubu22-HIP-TPL/prerequisites
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
bc
bison
ccache
cmake
ninja-build
g++
gcc
git
libffi-dev
libgtest-dev
libpython3.10-dev
python3
python3-dev
python3-pip
python3-setuptools
vim
wget
sudo
libglib2.0-0
libsm6
libxrender1
libxext6
3 changes: 3 additions & 0 deletions upstream-buildbots/Ubu22-HIP-TPL/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 upstream-buildbots/Ubu22-HIP-TPL/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.3.3 jammy main