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

DRAFT: Update Dockerfile content #650

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
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
8 changes: 4 additions & 4 deletions .github/actions/do_build_dpcpp/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ runs:
- name: Install Ninja
uses: llvm/actions/install-ninja@main

- name: Install spirv tools
shell: bash
run:
sudo apt-get install spirv-tools
#ALAN - name: Install spirv tools
#ALAN shell: bash
#ALAN run:
#ALAN sudo apt-get install spirv-tools

- name: clone dpc++
if: inputs.create_dpcpp_artefact_method == 'build'
Expand Down
10 changes: 5 additions & 5 deletions .github/actions/do_build_icd/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ runs:
- name: Install Ninja
uses: llvm/actions/install-ninja@a1ea791b03c8e61f53a0e66f2f73db283aa0f01e # main branch

- name: install cross tools
if: steps.calc_vars.outputs.arch != 'x86_64'
uses: ./.github/actions/do_install_ubuntu_cross_tools
with:
cross_arch: ${{ steps.calc_vars.outputs.arch }}
#ALAN - name: install cross tools
#ALAN if: steps.calc_vars.outputs.arch != 'x86_64'
#ALAN uses: ./.github/actions/do_install_ubuntu_cross_tools
#ALAN with:
#ALAN cross_arch: ${{ steps.calc_vars.outputs.arch }}

- name: clone headers
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/do_build_ock_artefact/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ runs:
llvm_version: ${{ inputs.llvm_version }}
llvm_build_type: RelAssert
cross_arch: ${{ steps.calc_vars.outputs.arch == 'x86_64' && 'none' || steps.calc_vars.outputs.arch }}
vulkan_sdk_install: ${{ inputs.vulkan_sdk_install }}
#ALAN vulkan_sdk_install: ${{ inputs.vulkan_sdk_install }}
os: ${{ contains(inputs.target, 'windows') && 'windows' || 'ubuntu' }}

- name: build ock x86
Expand Down
32 changes: 16 additions & 16 deletions .github/actions/do_build_opencl_cts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ runs:
repository: KhronosGroup/OpenCL-CTS
path: OpenCL-CTS

- name: aarch64 set-up # TODO: update if/when qemu no longer used
if: steps.calc_vars.outputs.arch == 'aarch64'
shell: bash
run: |
set -x
sudo sed -i -e '/^deb /{h;s|deb |&[arch=amd64,i386] |p;g;s|deb http://[^ ]*|deb [arch=arm64,riscv64] http://ports.ubuntu.com/ubuntu-ports|p;d}' /etc/apt/sources.list
sudo dpkg --add-architecture arm64
sudo apt-get install --yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
sudo apt-get update
if [[ "${{inputs.target}}" =~ .*aarch64.* ]] ; then
# TODO: Only needed for run - could be moved to corresponding run action
echo QEMU INSTALL MATCH FOR ${{inputs.target}}
sudo apt-get install --yes qemu-user
fi
#ALAN - name: aarch64 set-up # TODO: update if/when qemu no longer used
#ALAN if: steps.calc_vars.outputs.arch == 'aarch64'
#ALAN shell: bash
#ALAN run: |
#ALAN set -x
#ALAN sudo sed -i -e '/^deb /{h;s|deb |&[arch=amd64,i386] |p;g;s|deb http://[^ ]*|deb [arch=arm64,riscv64] http://ports.ubuntu.com/ubuntu-ports|p;d}' /etc/apt/sources.list
#ALAN sudo dpkg --add-architecture arm64
#ALAN sudo apt-get install --yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
#ALAN sudo apt-get update
#ALAN if [[ "${{inputs.target}}" =~ .*aarch64.* ]] ; then
#ALAN # TODO: Only needed for run - could be moved to corresponding run action
#ALAN echo QEMU INSTALL MATCH FOR ${{inputs.target}}
#ALAN sudo apt-get install --yes qemu-user
#ALAN fi

- name: build opencl cts
shell: bash
Expand All @@ -57,8 +57,8 @@ runs:
run: |
echo CMAKE_TOOLCHAIN is: $CMAKE_TOOLCHAIN
# get spirv-as
sudo apt-get update
sudo apt-get install -y spirv-tools
#ALAN sudo apt-get update
#ALAN sudo apt-get install -y spirv-tools
# apply patches
pushd OpenCL-CTS
git log -1
Expand Down
1 change: 1 addition & 0 deletions .github/actions/do_install_ubuntu_cross_tools/action.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#ALAN DELETE THIS FILE AND REMOVE ALL REFERENCES TO IT
name: install ubuntu cross compilation tools
description: install ubuntu tools needed for cross compilation

Expand Down
72 changes: 36 additions & 36 deletions .github/actions/setup_build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ inputs:
cross_arch:
description: 'Cross compilation architecture from: x86, arm, aarch64, riscv64. Default: "none" (no cross compile), will auto fetch native arch'
default: "none"
clang_tidy:
description: 'Enable installing of clang-tidy (currently 19)'
type: boolean
default: false
vulkan_sdk_install:
description: 'vulkan install flag'
default: true
#ALAN clang_tidy:
#ALAN description: 'Enable installing of clang-tidy (currently 19)'
#ALAN type: boolean
#ALAN default: false
#ALAN vulkan_sdk_install:
#ALAN description: 'vulkan install flag'
#ALAN default: true

runs:
# We don't want a new docker just a list of steps, so mark as composite
Expand All @@ -43,40 +43,40 @@ runs:
echo "PATH=$PATH:$HOME/.local/bin" >> $GITHUB_ENV
# required due to using non docker to build llvm
# If we switch to always using docker we can drop.
sudo apt-get install --yes lib32ncurses-dev
if [ "${{ inputs.cross_arch }}" = "x86" ]; then sudo dpkg --add-architecture i386 ; fi
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
if [ "${{ inputs.ubuntu_version }}" = "20.04" ]; then sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.243-focal.list https://packages.lunarg.com/vulkan/1.3.243/lunarg-vulkan-1.3.243-focal.list; fi
if [ "${{ inputs.ubuntu_version }}" = "22.04" ]; then sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.243-jammy.list https://packages.lunarg.com/vulkan/1.3.243/lunarg-vulkan-1.3.243-jammy.list; fi
if [ "${{ inputs.ubuntu_version }}" = "24.04" ]; then sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-noble.list https://packages.lunarg.com/vulkan/lunarg-vulkan-noble.list; fi
#ALAN sudo apt-get install --yes lib32ncurses-dev
#ALAN if [ "${{ inputs.cross_arch }}" = "x86" ]; then sudo dpkg --add-architecture i386 ; fi
#ALAN wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
#ALAN if [ "${{ inputs.ubuntu_version }}" = "20.04" ]; then sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.243-focal.list https://packages.lunarg.com/vulkan/1.3.243/lunarg-vulkan-1.3.243-focal.list; fi
#ALAN if [ "${{ inputs.ubuntu_version }}" = "22.04" ]; then sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.243-jammy.list https://packages.lunarg.com/vulkan/1.3.243/lunarg-vulkan-1.3.243-jammy.list; fi
#ALAN if [ "${{ inputs.ubuntu_version }}" = "24.04" ]; then sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-noble.list https://packages.lunarg.com/vulkan/lunarg-vulkan-noble.list; fi

if [ "${{ inputs.clang_tidy }}" = "true" ]; then
wget -qO - https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor - | sudo tee /usr/share/keyrings/llvm-archive-keyring.gpg >/dev/null
if [ "${{ inputs.ubuntu_version }}" = "20.04" ]; then echo 'deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/focal/ llvm-toolchain-focal-19 main' | sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null; fi
if [ "${{ inputs.ubuntu_version }}" = "22.04" ]; then echo 'deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main' | sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null; fi
if [ "${{ inputs.ubuntu_version }}" = "24.04" ]; then echo 'deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/noble/ llvm-toolchain-noble-19 main' | sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null; fi
fi
#ALAN if [ "${{ inputs.clang_tidy }}" = "true" ]; then
#ALAN wget -qO - https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor - | sudo tee /usr/share/keyrings/llvm-archive-keyring.gpg >/dev/null
#ALAN if [ "${{ inputs.ubuntu_version }}" = "20.04" ]; then echo 'deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/focal/ llvm-toolchain-focal-19 main' | sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null; fi
#ALAN if [ "${{ inputs.ubuntu_version }}" = "22.04" ]; then echo 'deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main' | sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null; fi
#ALAN if [ "${{ inputs.ubuntu_version }}" = "24.04" ]; then echo 'deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/noble/ llvm-toolchain-noble-19 main' | sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null; fi
#ALAN fi

sudo apt-get update
if [ "${{ inputs.clang_tidy }}" = "true" ]; then sudo apt-get install --yes clang-tidy-19; fi
pip install lit clang-format==19.1.0 virtualenv
#ALAN sudo apt-get update
#ALAN if [ "${{ inputs.clang_tidy }}" = "true" ]; then sudo apt-get install --yes clang-tidy-19; fi
#ALAN pip install lit clang-format==19.1.0 virtualenv
# required for gtest-terse-runner running in docker
sudo apt-get install --yes python3-colorama
sudo apt-get install --yes doxygen
if [ "${{ inputs.vulkan_sdk_install }}" = "true" ]; then \
sudo apt-get install --yes vulkan-sdk
fi
#ALAN sudo apt-get install --yes python3-colorama
#ALAN sudo apt-get install --yes doxygen
#ALAN if [ "${{ inputs.vulkan_sdk_install }}" = "true" ]; then \
#ALAN sudo apt-get install --yes vulkan-sdk
#ALAN fi
# TODO: Only required if we are running something that requires qemu, not required for building
if [ "${{ inputs.cross_arch }}" != "none" ] && [ "${{ inputs.cross_arch }}" != "x86" ]; then \
# Install QEMU for testing cross compilation.
sudo apt-get install --yes qemu-user; \
fi
#ALAN if [ "${{ inputs.cross_arch }}" != "none" ] && [ "${{ inputs.cross_arch }}" != "x86" ]; then \
#ALAN # Install QEMU for testing cross compilation.
#ALAN sudo apt-get install --yes qemu-user; \
#ALAN fi

- name: Install cross arch tools
if: ${{ inputs.os == 'ubuntu' }}
uses: ./.github/actions/do_install_ubuntu_cross_tools
with:
cross_arch: ${{ inputs.cross_arch }}
#ALAN - name: Install cross arch tools
#ALAN if: ${{ inputs.os == 'ubuntu' }}
#ALAN uses: ./.github/actions/do_install_ubuntu_cross_tools
#ALAN with:
#ALAN cross_arch: ${{ inputs.cross_arch }}

- name: Install windows prerequisites
if: ${{ inputs.os == 'windows' }}
Expand Down
83 changes: 6 additions & 77 deletions .github/dockerfiles/Dockerfile_22.04
Original file line number Diff line number Diff line change
@@ -1,80 +1,9 @@
FROM ubuntu:22.04

RUN apt-get update

# FROM INFRA UBUNTU BASE

RUN apt-get install -y git git-crypt wget curl jq xz-utils build-essential zlib1g-dev lsb-release libssl-dev
# Set the timezone, required to avoid hanging on input
ENV TZ=Europe/London
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# FROM 22 OCK BASE - if not already added

# Enable ability to install foreign packages for cross compilation
RUN dpkg --add-architecture i386
RUN dpkg --add-architecture arm64
RUN dpkg --add-architecture riscv64

# The main archive only hosts amd64 and i386, we need to add ports for arm64 and riscv64.
RUN sed -i -e '/^deb /{h;s|deb |&[arch=amd64,i386] |p;g;s|deb http://[^ ]*|deb [arch=arm64,riscv64] http://ports.ubuntu.com/ubuntu-ports|p;d}' /etc/apt/sources.list

# Add VulkanSDK latest package repository
RUN wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add -
RUN wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.243-jammy.list https://packages.lunarg.com/vulkan/1.3.243/lunarg-vulkan-1.3.243-jammy.list
# Sync the two above package repositories
RUN apt-get update

# Install minimum requirements
RUN apt-get install --yes cmake libtinfo-dev
# Install vulkan-sdk
RUN apt-get install --yes vulkan-sdk
# Install 32-bit requirements
RUN apt-get install --yes gcc-multilib g++-multilib libc6-dev:i386 lib32tinfo-dev
# Install Arm requirements
RUN apt-get install --yes gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
# Install AArch64 requirements
RUN apt-get install --yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
# Install RISC-V requirements
RUN apt-get install --yes gcc-riscv64-linux-gnu g++-riscv64-linux-gnu
# Install recommended packages
RUN apt-get install --yes python3 python3-pip ninja-build doxygen
# Install documentation packages
RUN apt-get install --yes graphviz latexmk texlive-xetex xindy texlive-fonts-extra
# Install CI utility packages
RUN apt-get install --yes parallel
# Install QEMU for testing cross compilation.
RUN apt-get install --yes qemu-user
# Install pkg-config for dpc++ builds and locally built spir-v
RUN apt-get install --yes pkg-config

# Set-up pip
RUN update-alternatives --install /usr/bin/pip pip `which pip3` 30

# Install python packages
RUN pip install cmakelint colorama flake8 lit pylint requests virtualenv yapf python-gitlab distro clang-format==19.1.0

# FROM OUR CURRENT INSTALLS PLUS ANY NEW EXTRAS - if not already added

RUN apt install -y zstd
RUN apt install -y gnupg
RUN apt install -y gcc g++
RUN apt install -y file

# DO THIS LAST

# Install recent version of ccache in /usr
# Redis support requires ccache 4.4 or newer.
RUN git clone https://github.com/ccache/ccache.git && \
cd ccache && \
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`); \
git -c advice.detachedHead=false checkout ${LATEST_TAG} && \
#/usr/local/bin/cmake -Bbuild -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
# -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON \
# -DCMAKE_C_COMPILER=gcc-9 -DCMAKE_CXX_COMPILER=g++-9 -DENABLE_TESTING=OFF && \
#/usr/local/bin/cmake --build build --target install && \
cmake -Bbuild -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
-DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON \
-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DENABLE_TESTING=OFF && \
cmake --build build --target install && \
cd - && rm -rf ccache
RUN apt-get -y install sudo
RUN sudo apt install -y zstd
RUN sudo apt install -y gnupg
RUN sudo apt install -y wget gcc g++ cmake ninja-build python3 git curl
RUN sudo apt install -y python3-pip cmake
RUN sudo apt install -y file
83 changes: 6 additions & 77 deletions .github/dockerfiles/Dockerfile_24.04
Original file line number Diff line number Diff line change
@@ -1,80 +1,9 @@
FROM ubuntu:24.04

RUN apt-get update

# FROM INFRA UBUNTU BASE

RUN apt-get install -y git git-crypt wget curl jq xz-utils build-essential zlib1g-dev lsb-release libssl-dev
# Set the timezone, required to avoid hanging on input
ENV TZ=Europe/London
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# FROM 24 OCK BASE - if not already added

# Enable ability to install foreign packages for cross compilation
RUN dpkg --add-architecture i386
RUN dpkg --add-architecture arm64
RUN dpkg --add-architecture riscv64

# The main archive only hosts amd64 and i386, we need to add ports for arm64 and riscv64.
RUN sed -i -e '/^Types:/,/^Signed-By:/{/Types:/{h;d};H;/^Signed-By:/{g;s|$|\nArchitectures: amd64,i386\n|p;g;s|URIs: [^\n]*|URIs: http://ports.ubuntu.com/ubuntu-ports|;s|$|\nArchitectures: arm64,riscv64|p;};d}' /etc/apt/sources.list.d/ubuntu.sources

# Add VulkanSDK latest package repository
RUN wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add -
RUN wget -qO /etc/apt/sources.list.d/lunarg-vulkan-noble.list https://packages.lunarg.com/vulkan/lunarg-vulkan-noble.list
# Sync the two above package repositories
RUN apt-get update

# Install minimum requirements
RUN apt-get install --yes cmake libtinfo-dev
RUN apt-get install --yes vulkan-sdk
# Install 32-bit requirements
RUN apt-get install --yes gcc-multilib g++-multilib libc6-dev:i386 lib32ncurses-dev
# Install Arm requirements
RUN apt-get install --yes gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
# Install AArch64 requirements
RUN apt-get install --yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
# Install RISC-V requirements
RUN apt-get install --yes gcc-riscv64-linux-gnu g++-riscv64-linux-gnu
# Install recommended packages
RUN apt-get install --yes python3 python3-pip ninja-build doxygen
# Install documentation packages
RUN apt-get install --yes graphviz latexmk texlive-xetex xindy texlive-fonts-extra
# Install CI utility packages
RUN apt-get install --yes parallel
# Install QEMU for testing cross compilation.
RUN apt-get install --yes qemu-user
# Install pkgconf for dpc++ builds and locally built spir-v
RUN apt-get install --yes pkgconf:amd64 pkgconf:arm64 pkgconf:i386 pkgconf:riscv64

# Set-up pip
RUN update-alternatives --install /usr/bin/pip pip `which pip3` 30

# Install python packages
RUN apt-get install --yes python3-colorama python3-distro python3-flake8 python3-gitlab python3-requests python3-virtualenv python3-yapf pipx
RUN PIPX_HOME=/usr/local/share/pipx PIPX_BIN_DIR=/usr/local/bin PIPX_MAN_DIR=/usr/local/share/man pipx install cmakelint lit pylint clang-format==19.1.0

# FROM OUR CURRENT INSTALLS PLUS ANY NEW EXTRAS - if not already added

RUN apt install -y zstd
RUN apt install -y gnupg
RUN apt install -y gcc g++
RUN apt install -y file

# DO THIS LAST

# Install recent version of ccache in /usr
# Redis support requires ccache 4.4 or newer.
RUN git clone https://github.com/ccache/ccache.git && \
cd ccache && \
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`); \
git -c advice.detachedHead=false checkout ${LATEST_TAG} && \
#/usr/local/bin/cmake -Bbuild -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
# -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON \
# -DCMAKE_C_COMPILER=gcc-9 -DCMAKE_CXX_COMPILER=g++-9 -DENABLE_TESTING=OFF && \
#/usr/local/bin/cmake --build build --target install && \
cmake -Bbuild -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
-DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON \
-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DENABLE_TESTING=OFF && \
cmake --build build --target install && \
cd - && rm -rf ccache
RUN apt-get -y install sudo
RUN sudo apt install -y zstd
RUN sudo apt install -y gnupg
RUN sudo apt install -y wget gcc g++ cmake ninja-build python3 git curl
RUN sudo apt install -y python3-pip cmake
RUN sudo apt install -y file
Loading
Loading