|
1 | 1 | FROM ubuntu:24.04
|
2 | 2 |
|
3 | 3 | 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 |
0 commit comments