Vulkan SDK Update (#9)

Reviewed-on: #9
Co-authored-by: Romain BOULLARD <romain.boullard@protonmail.com>
Co-committed-by: Romain BOULLARD <romain.boullard@protonmail.com>
This commit was merged in pull request #9.
This commit is contained in:
2026-04-15 08:58:01 +00:00
committed by Romain BOULLARD
parent 27ccfb1a1d
commit 1200a1377f
4 changed files with 61 additions and 116 deletions

View File

@@ -4,34 +4,63 @@ ARG BASE_BUILDER
# Base image
FROM $BASE_BUILDER
# Environment variables for ccache and pipx
ENV CCACHE_DIR=/ccache \
CCACHE_COMPRESS=1 \
CCACHE_MAXSIZE=10G \
CCACHE_COMPILERCHECK=content \
PATH=/root/.local/bin:$PATH
# Install system dependencies, clang, and pipx
# Install system dependencies
RUN apt-get update && apt-get install -y \
# Build tools
build-essential \
cppcheck \
ccache \
gcc \
g++ \
cmake \
ninja-build \
git \
bison \
pkg-config \
git \
ccache \
cppcheck \
wget \
lsb-release \
software-properties-common \
pipx \
&& rm -rf /var/lib/apt/lists/* \
\
# Install LLVM 21
&& wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh \
python-is-python3 \
python3-jsonschema \
ocaml-core \
\
# Libraries
libglm-dev \
libpng-dev \
libxml2-dev \
liblz4-dev \
libzstd-dev \
libpciaccess0 \
\
# X11 / XCB
libx11-dev \
libx11-xcb-dev \
libxcb-dri3-0 \
libxcb-dri3-dev \
libxcb-present0 \
libxcb-keysyms1-dev \
libxcb-randr0-dev \
libxcb-ewmh-dev \
\
# Wayland
libwayland-dev \
wayland-protocols \
\
# Misc display
libxrandr-dev \
\
# Qt
qtbase5-dev \
qt6-base-dev \
&& rm -rf /var/lib/apt/lists/*
ENV PATH="/root/.local/bin:${PATH}"
# Install LLVM 20 and symlink tools
RUN wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh \
&& chmod +x /tmp/llvm.sh \
&& /tmp/llvm.sh 20 all \
\
# Symlinks for clang 21 tools
&& ln -sf /usr/bin/clang-20 /usr/bin/clang \
&& ln -sf /usr/bin/clang++-20 /usr/bin/clang++ \
&& ln -sf /usr/bin/llvm-profdata-20 /usr/bin/llvm-profdata \
@@ -42,9 +71,7 @@ RUN apt-get update && apt-get install -y \
&& ln -sf /usr/bin/llvm-ar-20 /usr/bin/llvm-ar \
&& ln -sf /usr/bin/llvm-nm-20 /usr/bin/llvm-nm \
&& ln -sf /usr/bin/llvm-ranlib-20 /usr/bin/llvm-ranlib \
\
# Reset ccache stats
&& ccache --zero-stats
&& rm -f /tmp/llvm.sh
RUN VERSION=1.2.0; \
curl -sSL "https://github.com/facebook/infer/releases/download/v$VERSION/infer-linux-x86_64-v$VERSION.tar.xz" \
@@ -52,8 +79,7 @@ RUN VERSION=1.2.0; \
ln -s "/opt/infer-linux-x86_64-v$VERSION/bin/infer" /usr/bin/infer
# Install pipx and Conan
RUN pipx ensurepath \
&& pipx install conan \
RUN pipx install conan \
&& pipx install gcovr
# Build and install mold
@@ -61,8 +87,6 @@ RUN git clone --branch v2.40.4 https://github.com/rui314/mold.git /tmp/mold \
&& cd /tmp/mold \
&& cmake . -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-B build \
&& cmake --build build -j$(nproc) \
&& cmake --install build \
@@ -73,5 +97,16 @@ RUN conan config install https://git.romainboullard.com/BigfootDev/ConanProfiles
&& conan remote add bigfootpackages https://conan.romainboullard.com/artifactory/api/conan/BigfootPackages \
&& conan remote disable conancenter
# Show ccache stats (optional, for debugging)
RUN ccache --show-stats
# Install Vulkan SDK 1.4.341.0
RUN wget -q https://sdk.lunarg.com/sdk/download/1.4.341.0/linux/vulkansdk-linux-x86_64-1.4.341.0.tar.xz \
-O /tmp/vulkansdk.tar.xz \
&& mkdir -p /opt/vulkan \
&& tar -xf /tmp/vulkansdk.tar.xz -C /opt/vulkan \
&& rm /tmp/vulkansdk.tar.xz
ENV VULKAN_SDK=/opt/vulkan/1.4.341.0/x86_64
ENV PATH="${VULKAN_SDK}/bin:${PATH}"
ENV LD_LIBRARY_PATH="${VULKAN_SDK}/lib:${LD_LIBRARY_PATH}"
ENV VK_LAYER_PATH="${VULKAN_SDK}/share/vulkan/explicit_layer.d"
ENV VK_ADD_LAYER_PATH="${VULKAN_SDK}/share/vulkan/explicit_layer.d"
ENV PKG_CONFIG_PATH="${VULKAN_SDK}/lib/pkgconfig/:${PKG_CONFIG_PATH}"