ARG BASE_IMAGE=ubuntu:24.04 ARG APT_MIRROR="" ARG APT_PORTS_MIRROR="" FROM ${BASE_IMAGE} AS builder ARG BACKEND=rerankers ARG BUILD_TYPE ENV BUILD_TYPE=${BUILD_TYPE} ARG CUDA_MAJOR_VERSION ARG CUDA_MINOR_VERSION ARG SKIP_DRIVERS=false ENV CUDA_MAJOR_VERSION=${CUDA_MAJOR_VERSION} ENV CUDA_MINOR_VERSION=${CUDA_MINOR_VERSION} ENV DEBIAN_FRONTEND=noninteractive ARG TARGETARCH ARG TARGETVARIANT ARG GO_VERSION=1.25.4 ARG UBUNTU_VERSION=2404 ARG AMDGPU_TARGETS ENV AMDGPU_TARGETS=${AMDGPU_TARGETS} ARG APT_MIRROR ARG APT_PORTS_MIRROR # gcc-14 is the default on noble (ubuntu:24.04) but absent from jammy # (the L4T jetpack r36.4.0 base). LocalVQE specifically needs it; the # other Go backends compile fine with the default gcc shipped via # build-essential. So: try gcc-14 from the configured repos, fall back # gracefully when it's not available so jammy-based builds don't fail # at the apt step. RUN --mount=type=bind,source=.docker/apt-mirror.sh,target=/usr/local/sbin/apt-mirror \ APT_MIRROR="${APT_MIRROR}" APT_PORTS_MIRROR="${APT_PORTS_MIRROR}" sh /usr/local/sbin/apt-mirror && \ apt-get update && \ apt-get install -y --no-install-recommends \ build-essential \ git ccache \ ca-certificates \ make cmake wget libopenblas-dev \ curl unzip \ libssl-dev && \ if apt-cache show gcc-14 >/dev/null 2>&1 && apt-cache show g++-14 >/dev/null 2>&1; then \ apt-get install -y --no-install-recommends gcc-14 g++-14 && \ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 \ --slave /usr/bin/g++ g++ /usr/bin/g++-14 \ --slave /usr/bin/gcov gcov /usr/bin/gcov-14; \ fi && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* # Cuda ENV PATH=/usr/local/cuda/bin:${PATH} # HipBLAS requirements ENV PATH=/opt/rocm/bin:${PATH} # Vulkan requirements RUN <