Skip to content

Commit 6f0201f

Browse files
Update dockerfiles with baseline content (#644)
Provides baseline for subsequent config migration from scripts
1 parent f9fb10d commit 6f0201f

File tree

3 files changed

+156
-14
lines changed

3 files changed

+156
-14
lines changed

.github/dockerfiles/Dockerfile_22.04

+77-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,80 @@
11
FROM ubuntu:22.04
22

33
RUN apt-get update
4-
RUN apt-get -y install sudo
5-
RUN sudo apt install -y zstd
6-
RUN sudo apt install -y gnupg
7-
RUN sudo apt install -y wget gcc g++ cmake ninja-build python3 git curl
8-
RUN sudo apt install -y python3-pip cmake
9-
RUN sudo apt install -y file
4+
5+
# FROM INFRA UBUNTU BASE
6+
7+
RUN apt-get install -y git git-crypt wget curl jq xz-utils build-essential zlib1g-dev lsb-release libssl-dev
8+
# Set the timezone, required to avoid hanging on input
9+
ENV TZ=Europe/London
10+
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
11+
12+
# FROM 22 OCK BASE - if not already added
13+
14+
# Enable ability to install foreign packages for cross compilation
15+
RUN dpkg --add-architecture i386
16+
RUN dpkg --add-architecture arm64
17+
RUN dpkg --add-architecture riscv64
18+
19+
# The main archive only hosts amd64 and i386, we need to add ports for arm64 and riscv64.
20+
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
21+
22+
# Add VulkanSDK latest package repository
23+
RUN wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add -
24+
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
25+
# Sync the two above package repositories
26+
RUN apt-get update
27+
28+
# Install minimum requirements
29+
RUN apt-get install --yes cmake libtinfo-dev
30+
# Install vulkan-sdk
31+
RUN apt-get install --yes vulkan-sdk
32+
# Install 32-bit requirements
33+
RUN apt-get install --yes gcc-multilib g++-multilib libc6-dev:i386 lib32tinfo-dev
34+
# Install Arm requirements
35+
RUN apt-get install --yes gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
36+
# Install AArch64 requirements
37+
RUN apt-get install --yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
38+
# Install RISC-V requirements
39+
RUN apt-get install --yes gcc-riscv64-linux-gnu g++-riscv64-linux-gnu
40+
# Install recommended packages
41+
RUN apt-get install --yes python3 python3-pip ninja-build doxygen
42+
# Install documentation packages
43+
RUN apt-get install --yes graphviz latexmk texlive-xetex xindy texlive-fonts-extra
44+
# Install CI utility packages
45+
RUN apt-get install --yes parallel
46+
# Install QEMU for testing cross compilation.
47+
RUN apt-get install --yes qemu-user
48+
# Install pkg-config for dpc++ builds and locally built spir-v
49+
RUN apt-get install --yes pkg-config
50+
51+
# Set-up pip
52+
RUN update-alternatives --install /usr/bin/pip pip `which pip3` 30
53+
54+
# Install python packages
55+
RUN pip install cmakelint colorama flake8 lit pylint requests virtualenv yapf python-gitlab distro clang-format==19.1.0
56+
57+
# FROM OUR CURRENT INSTALLS PLUS ANY NEW EXTRAS - if not already added
58+
59+
RUN apt install -y zstd
60+
RUN apt install -y gnupg
61+
RUN apt install -y gcc g++
62+
RUN apt install -y file
63+
64+
# DO THIS LAST
65+
66+
# Install recent version of ccache in /usr
67+
# Redis support requires ccache 4.4 or newer.
68+
RUN git clone https://github.com/ccache/ccache.git && \
69+
cd ccache && \
70+
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`); \
71+
git -c advice.detachedHead=false checkout ${LATEST_TAG} && \
72+
#/usr/local/bin/cmake -Bbuild -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
73+
# -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON \
74+
# -DCMAKE_C_COMPILER=gcc-9 -DCMAKE_CXX_COMPILER=g++-9 -DENABLE_TESTING=OFF && \
75+
#/usr/local/bin/cmake --build build --target install && \
76+
cmake -Bbuild -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
77+
-DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON \
78+
-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DENABLE_TESTING=OFF && \
79+
cmake --build build --target install && \
80+
cd - && rm -rf ccache

.github/dockerfiles/Dockerfile_24.04

+77-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,80 @@
11
FROM ubuntu:24.04
22

33
RUN apt-get update
4-
RUN apt-get -y install sudo
5-
RUN sudo apt install -y zstd
6-
RUN sudo apt install -y gnupg
7-
RUN sudo apt install -y wget gcc g++ cmake ninja-build python3 git curl
8-
RUN sudo apt install -y python3-pip cmake
9-
RUN sudo apt install -y file
4+
5+
# FROM INFRA UBUNTU BASE
6+
7+
RUN apt-get install -y git git-crypt wget curl jq xz-utils build-essential zlib1g-dev lsb-release libssl-dev
8+
# Set the timezone, required to avoid hanging on input
9+
ENV TZ=Europe/London
10+
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
11+
12+
# FROM 24 OCK BASE - if not already added
13+
14+
# Enable ability to install foreign packages for cross compilation
15+
RUN dpkg --add-architecture i386
16+
RUN dpkg --add-architecture arm64
17+
RUN dpkg --add-architecture riscv64
18+
19+
# The main archive only hosts amd64 and i386, we need to add ports for arm64 and riscv64.
20+
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
21+
22+
# Add VulkanSDK latest package repository
23+
RUN wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add -
24+
RUN wget -qO /etc/apt/sources.list.d/lunarg-vulkan-noble.list https://packages.lunarg.com/vulkan/lunarg-vulkan-noble.list
25+
# Sync the two above package repositories
26+
RUN apt-get update
27+
28+
# Install minimum requirements
29+
RUN apt-get install --yes cmake libtinfo-dev
30+
RUN apt-get install --yes vulkan-sdk
31+
# Install 32-bit requirements
32+
RUN apt-get install --yes gcc-multilib g++-multilib libc6-dev:i386 lib32ncurses-dev
33+
# Install Arm requirements
34+
RUN apt-get install --yes gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
35+
# Install AArch64 requirements
36+
RUN apt-get install --yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
37+
# Install RISC-V requirements
38+
RUN apt-get install --yes gcc-riscv64-linux-gnu g++-riscv64-linux-gnu
39+
# Install recommended packages
40+
RUN apt-get install --yes python3 python3-pip ninja-build doxygen
41+
# Install documentation packages
42+
RUN apt-get install --yes graphviz latexmk texlive-xetex xindy texlive-fonts-extra
43+
# Install CI utility packages
44+
RUN apt-get install --yes parallel
45+
# Install QEMU for testing cross compilation.
46+
RUN apt-get install --yes qemu-user
47+
# Install pkgconf for dpc++ builds and locally built spir-v
48+
RUN apt-get install --yes pkgconf:amd64 pkgconf:arm64 pkgconf:i386 pkgconf:riscv64
49+
50+
# Set-up pip
51+
RUN update-alternatives --install /usr/bin/pip pip `which pip3` 30
52+
53+
# Install python packages
54+
RUN apt-get install --yes python3-colorama python3-distro python3-flake8 python3-gitlab python3-requests python3-virtualenv python3-yapf pipx
55+
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
56+
57+
# FROM OUR CURRENT INSTALLS PLUS ANY NEW EXTRAS - if not already added
58+
59+
RUN apt install -y zstd
60+
RUN apt install -y gnupg
61+
RUN apt install -y gcc g++
62+
RUN apt install -y file
63+
64+
# DO THIS LAST
65+
66+
# Install recent version of ccache in /usr
67+
# Redis support requires ccache 4.4 or newer.
68+
RUN git clone https://github.com/ccache/ccache.git && \
69+
cd ccache && \
70+
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`); \
71+
git -c advice.detachedHead=false checkout ${LATEST_TAG} && \
72+
#/usr/local/bin/cmake -Bbuild -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
73+
# -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON \
74+
# -DCMAKE_C_COMPILER=gcc-9 -DCMAKE_CXX_COMPILER=g++-9 -DENABLE_TESTING=OFF && \
75+
#/usr/local/bin/cmake --build build --target install && \
76+
cmake -Bbuild -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
77+
-DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON \
78+
-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DENABLE_TESTING=OFF && \
79+
cmake --build build --target install && \
80+
cd - && rm -rf ccache

.github/workflows/publish_docker_images.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ jobs:
3232
run: |
3333
for dockerfile in ${{ github.workspace }}/.github/dockerfiles/Dockerfile_* ; do
3434
VERSION=${dockerfile##*_}
35-
docker build . -f $dockerfile --tag $REGISTRY/ock_ubuntu_$VERSION:latest
36-
docker push $REGISTRY/ock_ubuntu_$VERSION:latest
35+
docker build . -f $dockerfile --tag $REGISTRY/ock_test_ubuntu_$VERSION:latest
36+
docker push $REGISTRY/ock_test_ubuntu_$VERSION:latest
3737
done

0 commit comments

Comments
 (0)