ARG BASE_IMAGE=ubuntu:22.04 ARG GRPC_BASE_IMAGE=${BASE_IMAGE} # The grpc target does one thing, it builds and installs GRPC. This is in it's own layer so that it can be effectively cached by CI. # You probably don't need to change anything here, and if you do, make sure that CI is adjusted so that the cache continues to work. FROM ${GRPC_BASE_IMAGE} AS grpc # This is a bit of a hack, but it's required in order to be able to effectively cache this layer in CI ARG GRPC_MAKEFLAGS="-j4 -Otarget" ARG GRPC_VERSION=v1.65.0 ARG CMAKE_FROM_SOURCE=false ARG CMAKE_VERSION=3.26.4 ENV MAKEFLAGS=${GRPC_MAKEFLAGS} WORKDIR /build RUN apt-get update && \ apt-get install -y --no-install-recommends \ ca-certificates \ build-essential curl libssl-dev \ git && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* # Install CMake (the version in 22.04 is too old) RUN < /run/localai/capability && \ if [ "amd64" = "$TARGETARCH" ]; then wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add - && \ wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list && \ apt-get update && \ apt-get install -y \ vulkan-sdk && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* fi if [ "arm64" = "$TARGETARCH" ]; then # For ARM64, we need to build the Vulkan SDK manually as there are no packages available mkdir vulkan && cd vulkan && curl -L -o vulkan-sdk.tar.xz https://github.com/mudler/vulkan-sdk-arm/releases/download/1.4.321.1/vulkansdk-ubuntu-22.04-arm-1.4.321.1.tar.xz && \ tar -xvf vulkan-sdk.tar.xz && \ rm vulkan-sdk.tar.xz && \ cd * && \ cp -rfv aarch64/* /usr/ && vulkaninfo \ cd ../.. && \ rm -rf vulkan fi fi EOT # CuBLAS requirements RUN <