Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .github/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ development environment.

# How to build docker image

To build docker image on local machine execute:
To build docker image on local machine, enter the root dir of the repository and execute:

```sh
docker build -t ur:ubuntu-22.04 -f ./ubuntu-22.04.Dockerfile .
docker build -t ur:ubuntu-22.04 -f .github/docker/ubuntu-22.04.Dockerfile .
```

To set any build time variable (e.g., an optional ARG from docker recipe), add to the command (after `build`), e.g.:
Expand Down
82 changes: 82 additions & 0 deletions .github/docker/fedora-40.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Copyright (C) 2023-2024 Intel Corporation
# Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
# See LICENSE.TXT
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#
# Dockerfile - a 'recipe' for Docker to build an image of fedora-based
# environment for building the Unified Runtime project.
#

# Pull base image ("40")
FROM registry.hub.docker.com/library/fedora@sha256:5ce8497aeea599bf6b54ab3979133923d82aaa4f6ca5ced1812611b197c79eb0

# Set environment variables
ENV OS fedora
ENV OS_VER 40
ENV NOTTY 1

# Additional parameters to build docker without building components.
# These ARGs can be set in docker building phase and are used
# within bash scripts (executed within docker).
ARG SKIP_DPCPP_BUILD
ARG SKIP_LIBBACKTRACE_BUILD

# Base development packages
ARG BASE_DEPS="\
cmake \
git \
make"

# Unified Runtime's dependencies
ARG UR_DEPS="\
doxygen \
python3 \
python3-pip"

# Miscellaneous for our builds/CI (optional)
ARG MISC_DEPS="\
clang \
ncurses-libs-6.4 \
passwd \
sudo \
wget"

# Update and install required packages
RUN dnf update -y \
&& dnf install -y \
${BASE_DEPS} \
${UR_DEPS} \
${MISC_DEPS} \
&& dnf clean all

# Prepare a dir (accessible by anyone)
RUN mkdir --mode 777 /opt/ur/

# Additional dev. dependencies (installed via pip)
#
# It's actively used and tested only on selected distros. Be aware
# they may not work, because pip packages list differ from OS to OS.
COPY third_party/requirements.txt /opt/ur/requirements.txt

# Install DPC++
COPY .github/docker/install_dpcpp.sh /opt/ur/install_dpcpp.sh
ENV DPCPP_PATH=/opt/dpcpp
RUN /opt/ur/install_dpcpp.sh

# Install libbacktrace
COPY .github/docker/install_libbacktrace.sh /opt/ur/install_libbacktrace.sh
RUN /opt/ur/install_libbacktrace.sh

# Add a new (non-root) 'test_user'
ENV USER test_user
ENV USERPASS pass
# Change shell to bash with safe pipe usage
SHELL [ "/bin/bash", "-o", "pipefail", "-c" ]
RUN useradd -m ${USER} \
&& echo "${USER}:${USERPASS}" | chpasswd \
&& gpasswd wheel -a ${USER}

# Change shell back to default and switch to 'test_user'
SHELL ["/bin/sh", "-c"]
USER test_user
11 changes: 4 additions & 7 deletions .github/docker/install_dpcpp.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Copyright (C) 2023 Intel Corporation
# Copyright (C) 2023-2024 Intel Corporation
# Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
# See LICENSE.TXT
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Expand All @@ -15,9 +15,6 @@ if [ "${SKIP_DPCPP_BUILD}" ]; then
exit
fi

apt-get install -y --no-install-recommends \
libncurses5

mkdir -p ${DPCPP_PATH}
wget -O ${DPCPP_PATH}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/sycl-nightly%2F20230626/dpcpp-compiler.tar.gz
tar -xvf ${DPCPP_PATH}/dpcpp_compiler.tar.gz -C ${DPCPP_PATH}/
mkdir -p ${DPCPP_PATH}/dpcpp_compiler
wget -O ${DPCPP_PATH}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-01-29/sycl_linux.tar.gz
tar -xvf ${DPCPP_PATH}/dpcpp_compiler.tar.gz -C ${DPCPP_PATH}/dpcpp_compiler
92 changes: 92 additions & 0 deletions .github/docker/opensuse-leap-15.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Copyright (C) 2023-2024 Intel Corporation
# Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
# See LICENSE.TXT
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#
# Dockerfile - a 'recipe' for Docker to build an image of opensuse-leap-based
# environment for building the Unified Runtime project.
#

# Pull base image ("15")
FROM registry.hub.docker.com/opensuse/leap@sha256:1cf79e78bb69f39fb2f78a7c2c7ebc4b64cf8d82eb1df76cd36767a595ada7a8

# Set environment variables
ENV OS opensuse-leap
ENV OS_VER 15
ENV NOTTY 1

# Additional parameters to build docker without building components.
# These ARGs can be set in docker building phase and are used
# within bash scripts (executed within docker).
ARG SKIP_DPCPP_BUILD
ARG SKIP_LIBBACKTRACE_BUILD

# Base development packages
ARG BASE_DEPS="\
cmake \
gcc \
gcc-c++ \
git \
glibc-devel \
libstdc++-devel \
make"

# Unified Runtime's dependencies
ARG UR_DEPS="\
doxygen \
python3 \
python3-devel \
python3-pip"

# Miscellaneous for our builds/CI (optional)
ARG MISC_DEPS="\
clang \
gzip \
libncurses5 \
sudo \
tar \
wget"

# add openSUSE Leap 15.5 Oss repo
RUN zypper ar -f https://download.opensuse.org/distribution/leap/15.5/repo/oss/ oss

# Update and install required packages
RUN zypper update -y \
&& zypper install -y \
${BASE_DEPS} \
${UR_DEPS} \
${MISC_DEPS} \
&& zypper clean all

# Prepare a dir (accessible by anyone)
RUN mkdir --mode 777 /opt/ur/

# Additional dev. dependencies (installed via pip)
#
# It's actively used and tested only on selected distros. Be aware
# they may not work, because pip packages list differ from OS to OS.
COPY third_party/requirements.txt /opt/ur/requirements.txt

# Install DPC++
COPY .github/docker/install_dpcpp.sh /opt/ur/install_dpcpp.sh
ENV DPCPP_PATH=/opt/dpcpp
RUN /opt/ur/install_dpcpp.sh

# Install libbacktrace
COPY .github/docker/install_libbacktrace.sh /opt/ur/install_libbacktrace.sh
RUN /opt/ur/install_libbacktrace.sh

# Add a new (non-root) 'test_user' and switch to it
ENV USER test_user
ENV USERPASS pass
ENV PFILE ./password
RUN useradd -m ${USER} \
&& echo ${USERPASS} > ${PFILE} \
&& echo ${USERPASS} >> ${PFILE} \
&& passwd ${USER} < ${PFILE} \
&& rm -f ${PFILE} \
&& sed -i 's/# %wheel/%wheel/g' /etc/sudoers \
&& groupadd wheel \
&& gpasswd wheel -a ${USER}
USER test_user
93 changes: 93 additions & 0 deletions .github/docker/rockylinux-8.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Copyright (C) 2023-2024 Intel Corporation
# Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
# See LICENSE.TXT
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#
# Dockerfile - a 'recipe' for Docker to build an image of rockylinux-based
# environment for building the Unified Runtime project.
#

# Pull base image ("8.9")
FROM registry.hub.docker.com/library/rockylinux@sha256:9794037624aaa6212aeada1d28861ef5e0a935adaf93e4ef79837119f2a2d04c

# Set environment variables
ENV OS rockylinux
ENV OS_VER 8
ENV NOTTY 1

# Additional parameters to build docker without building components.
# These ARGs can be set in docker building phase and are used
# within bash scripts (executed within docker).
ARG SKIP_DPCPP_BUILD
ARG SKIP_LIBBACKTRACE_BUILD

# Base development packages
ARG BASE_DEPS="\
cmake \
git \
glibc-devel \
libstdc++-devel \
make"

# Unified Runtime's dependencies
ARG UR_DEPS="\
doxygen \
python3 \
python3-pip"

# Packages required by requirements.txt
ARG PRE_PYTHON_DEPS="\
libjpeg-turbo-devel \
python3-devel \
python3-wheel \
zlib-devel"

# Miscellaneous for our builds/CI (optional)
ARG MISC_DEPS="\
clang \
ncurses-libs-6.1 \
passwd \
sudo \
wget"

# Update and install required packages
RUN dnf update -y \
&& dnf --enablerepo devel install -y \
${BASE_DEPS} \
${UR_DEPS} \
${PRE_PYTHON_DEPS} \
${MISC_DEPS} \
&& dnf clean all

# Prepare a dir (accessible by anyone)
RUN mkdir --mode 777 /opt/ur/

# Additional dev. dependencies (installed via pip)
#
# It's actively used and tested only on selected distros. Be aware
# they may not work, because pip packages list differ from OS to OS.
COPY third_party/requirements.txt /opt/ur/requirements.txt

# Install DPC++
COPY .github/docker/install_dpcpp.sh /opt/ur/install_dpcpp.sh
ENV DPCPP_PATH=/opt/dpcpp
RUN /opt/ur/install_dpcpp.sh

# Install libbacktrace
COPY .github/docker/install_libbacktrace.sh /opt/ur/install_libbacktrace.sh
RUN /opt/ur/install_libbacktrace.sh

# Add a new (non-root) 'test_user'
ENV USER test_user
ENV USERPASS pass
# Change shell to bash with safe pipe usage
SHELL [ "/bin/bash", "-o", "pipefail", "-c" ]
RUN useradd -m $USER \
&& echo "${USERPASS}" | passwd "${USER}" --stdin \
&& gpasswd wheel -a "${USER}" \
&& echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

# Change shell back to default and switch to 'test_user'
SHELL ["/bin/sh", "-c"]
USER test_user
85 changes: 85 additions & 0 deletions .github/docker/rockylinux-9.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Copyright (C) 2023-2024 Intel Corporation
# Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
# See LICENSE.TXT
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#
# Dockerfile - a 'recipe' for Docker to build an image of rockylinux-based
# environment for building the Unified Runtime project.
#

# Pull base image ("9.3")
FROM registry.hub.docker.com/library/rockylinux@sha256:d7be1c094cc5845ee815d4632fe377514ee6ebcf8efaed6892889657e5ddaaa6

# Set environment variables
ENV OS rockylinux
ENV OS_VER 9
ENV NOTTY 1

# Additional parameters to build docker without building components.
# These ARGs can be set in docker building phase and are used
# within bash scripts (executed within docker).
ARG SKIP_DPCPP_BUILD
ARG SKIP_LIBBACKTRACE_BUILD

# Base development packages
ARG BASE_DEPS="\
cmake \
git \
glibc-devel \
libstdc++-devel \
make"

# Unified Runtime's dependencies
ARG UR_DEPS="\
doxygen \
python3 \
python3-pip"

# Miscellaneous for our builds/CI (optional)
ARG MISC_DEPS="\
clang \
ncurses-libs-6.2 \
passwd \
sudo \
wget"

# Update and install required packages
RUN dnf update -y \
&& dnf --enablerepo devel install -y \
${BASE_DEPS} \
${UR_DEPS} \
${MISC_DEPS} \
&& dnf clean all

# Prepare a dir (accessible by anyone)
RUN mkdir --mode 777 /opt/ur/

# Additional dev. dependencies (installed via pip)
#
# It's actively used and tested only on selected distros. Be aware
# they may not work, because pip packages list differ from OS to OS.
COPY third_party/requirements.txt /opt/ur/requirements.txt

# Install DPC++
COPY .github/docker/install_dpcpp.sh /opt/ur/install_dpcpp.sh
ENV DPCPP_PATH=/opt/dpcpp
RUN /opt/ur/install_dpcpp.sh

# Install libbacktrace
COPY .github/docker/install_libbacktrace.sh /opt/ur/install_libbacktrace.sh
RUN /opt/ur/install_libbacktrace.sh

# Add a new (non-root) 'test_user'
ENV USER test_user
ENV USERPASS pass
# Change shell to bash with safe pipe usage
SHELL [ "/bin/bash", "-o", "pipefail", "-c" ]
RUN useradd -m $USER \
&& echo "${USERPASS}" | passwd "${USER}" --stdin \
&& gpasswd wheel -a "${USER}" \
&& echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

# Change shell back to default and switch to 'test_user'
SHELL ["/bin/sh", "-c"]
USER test_user
Loading