ARG IMAGE_TYPE=extras ARG BASE_IMAGE=ubuntu:22.04 ARG GRPC_BASE_IMAGE=${BASE_IMAGE} ARG INTEL_BASE_IMAGE=${BASE_IMAGE} # The requirements-core target is common to all images. It should not be placed in requirements-core unless every single build will use it. FROM ${BASE_IMAGE} AS requirements-core USER root ARG GO_VERSION=1.22.6 ARG CMAKE_VERSION=3.26.4 ARG CMAKE_FROM_SOURCE=false ARG TARGETARCH ARG TARGETVARIANT ENV DEBIAN_FRONTEND=noninteractive ENV EXTERNAL_GRPC_BACKENDS="coqui:/build/backend/python/coqui/run.sh,huggingface-embeddings:/build/backend/python/sentencetransformers/run.sh,transformers:/build/backend/python/transformers/run.sh,sentencetransformers:/build/backend/python/sentencetransformers/run.sh,rerankers:/build/backend/python/rerankers/run.sh,autogptq:/build/backend/python/autogptq/run.sh,bark:/build/backend/python/bark/run.sh,diffusers:/build/backend/python/diffusers/run.sh,openvoice:/build/backend/python/openvoice/run.sh,vall-e-x:/build/backend/python/vall-e-x/run.sh,vllm:/build/backend/python/vllm/run.sh,mamba:/build/backend/python/mamba/run.sh,exllama2:/build/backend/python/exllama2/run.sh,transformers-musicgen:/build/backend/python/transformers-musicgen/run.sh,parler-tts:/build/backend/python/parler-tts/run.sh" RUN apt-get update && \ apt-get install -y --no-install-recommends \ build-essential \ ccache \ ca-certificates \ curl libssl-dev \ git \ unzip upx-ucl && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* # Install CMake (the version in 22.04 is too old) RUN < /etc/apt/sources.list.d/intel-graphics.list ################################### ################################### # 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 <